Clarify a deviation from the original algorithm.
authorOwen Anderson <resistor@mac.com>
Mon, 21 Jan 2008 22:03:00 +0000 (22:03 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 21 Jan 2008 22:03:00 +0000 (22:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46218 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/StrongPHIElimination.cpp

index ff58e796bf5e7cf3e51f8a1065ea53321e6b68f6..5b80b94f3fcd05a80037eb1642900b1b3bdb5b32 100644 (file)
@@ -552,7 +552,10 @@ void StrongPHIElimination::processPHIUnion(MachineInstr* Inst,
       DomForestNode* child = *CI;   
       
       // If the current node is live-out of the defining block of one of its
-      // children, insert a copy for it
+      // children, insert a copy for it.  NOTE: The paper actually calls for
+      // a more elaborate heuristic for determining whether to insert copies
+      // for the child or the parent.  In the interest of simplicity, we're
+      // just always choosing the parent.
       if (isLiveOut(DFNode->getReg(),
           MRI.getVRegDef(child->getReg())->getParent(), MRI, LV)) {
         // Insert copies for parent