[llvm-commits] [llvm] r67212 - in /llvm/trunk: lib/Transforms/IPO/DeadArgumentElimination.cpp test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll

Frits van Bommel fvbommel at wxs.nl
Wed Mar 18 10:14:09 PDT 2009


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? :)



More information about the llvm-commits mailing list