[PATCH] Don't localize globals that may serve as leak checker roots.
samsonov at google.com
Fri Sep 27 01:39:57 PDT 2013
On Thu, Sep 26, 2013 at 8:41 PM, Rafael Espíndola <
rafael.espindola at gmail.com> wrote:
> > IMO moving globals to locals in main is basically a SPEC benchmark hack.
> > It's only profitable when most of the program can be inlined into main
> > the globals become register allocated.
> > The C++ standard sez [basic.start.main]p6: "The function main shall not
> > used (3.2) within a program." The C standard has no such language, so
> > optimization isn't really valid for C. IIRC this caused PNaCl some
> > problems.
> > So if we want to remove this optimization, it should be on *that* basis,
> > not because we want leak checking to work out of the box.
> Good point.
> Alexey, would you be ok with starting a new thread with a patch to
> remove this optimization completely?
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits