A few more comments.
authorOwen Anderson <resistor@mac.com>
Sun, 16 Dec 2007 04:07:23 +0000 (04:07 +0000)
committerOwen Anderson <resistor@mac.com>
Sun, 16 Dec 2007 04:07:23 +0000 (04:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45069 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/StrongPHIElimination.cpp

index 9b1c163dcfba86485f41d23bdcd3dacd75784031..ee62a6b30c9a7c2672641636de24e9b23f7ce8dc 100644 (file)
@@ -311,6 +311,10 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) {
   }
 }
 
+/// processPHIUnion - Take a set of candidate registers to be coallesced when
+/// decomposing the PHI instruction.  Use the DominanceForest to remove the ones
+/// that are known to interfere, and flag others that need to be checked for
+/// local interferences.
 void StrongPHIElimination::processPHIUnion(MachineInstr* Inst,
                                            std::set<unsigned>& PHIUnion,
                         std::vector<StrongPHIElimination::DomForestNode*>& DF,
@@ -322,6 +326,7 @@ void StrongPHIElimination::processPHIUnion(MachineInstr* Inst,
   LiveVariables& LV = getAnalysis<LiveVariables>();
   unsigned DestReg = Inst->getOperand(0).getReg();
   
+  // DF walk on the DomForest
   while (!worklist.empty()) {
     DomForestNode* DFNode = worklist.back();
     
@@ -350,7 +355,7 @@ void StrongPHIElimination::processPHIUnion(MachineInstr* Inst,
         // Add (p, c) to possible local interferences
         locals.push_back(std::make_pair(DFNode->getReg(), child->getReg()));
       }
-        
+      
       if (!visited.count(child)) {
         worklist.push_back(child);
         inserted = true;