[llvm-commits] [llvm] r112597 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/DwarfEHPrepare.cpp lib/CodeGen/LLVMTargetMachine.cpp

Duncan Sands baldrick at free.fr
Tue Aug 31 13:11:07 PDT 2010


Hi Bill,

>>> I'm fine with this, but please do the alloca promotion using SSAUpdater soon. Otherwise my horrible hack won't work for all of the cases I need it to. As John mentioned, I need to do reachability and not dominance. I'll fix it so that the DomTree stuff isn't needed.
>>
>> we never did any alloca promotion at -O0, so does that mean this already
>> sometimes wasn't working properly at -O0?  Also, I wasn't actually planning
>> to do alloca promotion for your 'orrible hack code because it makes my head
>> hurt, but perhaps I can be persuaded...
>>
> The horrible hack is there mostly for inlining, which doesn't occur at -O0.

aren't you confusing -O0 at the IR level and -O0 codegen?  I can optimize some
bitcode with -std-compile-opts and then pass it to "llc -O0"...  So in theory
llc needs to deal correctly with inlined code even at -O0.

We can get away with it in most cases. But it's quite easy to generate a case 
where it won't work. My guess is that it's a hand-written case that would fail.

Sounds like a good testcase to have in the testsuite!

> I just don't want a regression, and since you took the code out I thought you would replace it. :-)

There is something to what you say :)

But if it works, then it's fine being omitted.

I think I'd better test it harder...

Ciao,

Duncan.



More information about the llvm-commits mailing list