[llvm-commits] [llvm] r48278 - /llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp

Evan Cheng evan.cheng at apple.com
Wed Mar 12 00:17:51 PDT 2008


>
>
>   while (P != MBB->end() && P->getOpcode() == TargetInstrInfo::PHI) {
>     unsigned DestReg = P->getOperand(0).getReg();
>
> +    LiveInterval& PI = LI.getOrCreateInterval(DestReg);
> +    unsigned pIdx = LI.getInstructionIndex(P);
> +    VNInfo* PVN = PI.getLiveRangeContaining(pIdx)->valno;
> +    PhiValueNumber.insert(std::make_pair(DestReg, PVN->id));
> +

Are you tracking the val# created by the PHI node? If so, you probably  
want LI.getDefIndex(LI.getInstructionIndex(P)). You may also want to  
assert if PVN is null.

Evan

>
>     // PHIUnion is the set of incoming registers to the PHI node that
>     // are going to be renames rather than having copies inserted.   
> This set
>     // is refinded over the course of this function.  UnionedBlocks  
> is the set
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080312/03852510/attachment.html>


More information about the llvm-commits mailing list