[cfe-dev] Strange default optimization passes
Daniel Dunbar
daniel at zuster.org
Tue Sep 8 19:52:13 PDT 2009
On Tue, Sep 8, 2009 at 6:49 PM, Eli Friedman<eli.friedman at gmail.com> wrote:
> I just noticed when looking at some code in clang that at -O3, we run
> scalarrepl, then run mem2reg almost immediately afterwards. I don't
> think this is intentional, but I'm not exactly sure how we ended up in
> the current situation.
It may not be, but its been that way for a long time. FWIW, we share
the optimization pass list with llvm-gcc and opt. At the time I
created StandardPasses.h, I did some small massaging to opt's pass
list if I recall correctly, but if you run your example with llvm-gcc
you should see the same thing (the only difference I see between the
lists is that we run prune-eh and llvm-gcc doesn't, this is a bug on
our part).
If you want to dig further it probably makes sense to look at the svn
history for llvm-backend.cpp in llvm-gcc.
- Daniel
More information about the cfe-dev
mailing list