[llvm-commits] [llvm] r67212 - in /llvm/trunk: lib/Transforms/IPO/DeadArgumentElimination.cpp test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll
Chris Lattner
clattner at apple.com
Wed Mar 18 11:21:36 PDT 2009
On Mar 18, 2009, at 10:14 AM, Frits van Bommel wrote:
> Chris Lattner wrote:
>> aha, DAE does have to think about PHI nodes. Many thanks to "Dr
>> Evil" (aka Duncan)
>> for pointing this out :)
>
>> - InsertPt = II->getNormalDest()->begin();
>> - assert(!isa<PHINode>(InsertPt) &&
>> - "Can't have a use of the invoke value if the edge
>> is critical");
>> + BasicBlock::iterator IP = II->getNormalDest()->begin();
>> + while (isa<PHINode>(IP)) ++IP;
>> + InsertPt = IP;
>
> What about the even *more* evil case of the phi being a user of the
> invoke? :)
As discussed previously, DAE won't transform the invoke in that case.
-Chris
More information about the llvm-commits
mailing list