diff options
author | Eli Bendersky <eliben@chromium.org> | 2013-07-09 15:29:37 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@chromium.org> | 2013-07-09 15:29:37 -0700 |
commit | 299c82a21a9fd010534ea59c46ae0b88c21f25b7 (patch) | |
tree | ef0249a8e74e2d1719330fd58bf0df16a3bf5c09 /lib/Analysis/NaCl/PNaClABIVerifyModule.cpp | |
parent | af49991972c1ca2364cd7377f4781893ffb3ffc5 (diff) |
Make GlobalOpt's GV-by-alloca replacement work for PNaCl.
GlobalOpt currently assumes only an external "main" is the "real main".
This is no longer the case for PNaCl, where we internalize "main". Make
the test more strict and PNaCl specific by checking that "main" is just
used once - in a call from "_start", but does not have to be external.
Note that this also addresses a possible bug in the optimization for C
code, since C does not guarantee that main is not recursive.
This CL's purpose is to address a SPEC performance regression - 10% in
183.equake. The regression appeared after our ABI change that made 'main'
internal, which disabled this particular optimization. The CL addresses
this by re-enabling the optimization and also being more C-standard
conforming.
BUG=None
Review URL: https://codereview.chromium.org/18615015
Diffstat (limited to 'lib/Analysis/NaCl/PNaClABIVerifyModule.cpp')
0 files changed, 0 insertions, 0 deletions