<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><blockquote type="cite"><font class="Apple-style-span" color="#000000"><br></font><br> while (P != MBB->end() && P->getOpcode() == TargetInstrInfo::PHI) {<br> unsigned DestReg = P->getOperand(0).getReg();<br><br>+ LiveInterval& PI = LI.getOrCreateInterval(DestReg);<br>+ unsigned pIdx = LI.getInstructionIndex(P);<br>+ VNInfo* PVN = PI.getLiveRangeContaining(pIdx)->valno;<br>+ PhiValueNumber.insert(std::make_pair(DestReg, PVN->id));<br>+</blockquote><div><br class="webkit-block-placeholder"></div>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.</div><div><br class="webkit-block-placeholder"></div><div>Evan</div><div><br><blockquote type="cite"><br> // PHIUnion is the set of incoming registers to the PHI node that<br> // are going to be renames rather than having copies inserted. This set<br> // is refinded over the course of this function. UnionedBlocks is the set<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></body></html>