[PATCH] Remove "localize global" optimization
Alexey Samsonov
samsonov at google.com
Wed Oct 2 08:33:59 PDT 2013
On Tue, Oct 1, 2013 at 10:39 PM, Bob Wilson <bob.wilson at apple.com> wrote:
>
> On Oct 1, 2013, at 10:20 AM, Nick Lewycky <nlewycky at gmail.com> wrote:
>
> >
> > The optimization was "important" for some SPEC test, but I think we're
> past caring about that.
>
> Not necessarily. Has anyone measured the impact on SPEC and other
> benchmarks?
>
I'm going to submit this anyway. See Reid's comment in
http://llvm-reviews.chandlerc.com/D1754 - looks like this optimization has
incorrect assumptions about C programs.
$ cat tmp/glob_di/main.c
static int glob;
static int rec;
int main() {
glob++;
if (!rec) {
rec = 1;
main();
}
return glob;
}
$ gcc -O2 tmp/glob_di/main.c ; ./a.out ; echo $?
2
$ ./bin/clang -O2 tmp/glob_di/main.c ; ./a.out ; echo $?
1
> >
> > http://llvm-reviews.chandlerc.com/D1769
> >
> > BRANCH
> > svn
> >
> > ARCANIST PROJECT
> > llvm
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
--
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131002/2ba7adef/attachment.html>
More information about the llvm-commits
mailing list