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

Bill Wendling wendling at apple.com
Tue Aug 31 13:41:44 PDT 2010


On Aug 31, 2010, at 1:11 PM, Duncan Sands wrote:

> 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!
> 
In that case, there shouldn't be any load/stores of the EH pointer laying around; at least I hope. Therefore, it would be okay.

As for the hand-written test case, it's been noted before that this code won't work for every thing. I tried my best to cover as many cases as I could, but it's sure to have deficiencies.

>> 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...
> 
Thanks! :-)

-bw





More information about the llvm-commits mailing list