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

Owen Anderson resistor at mac.com
Sat Dec 15 20:07:24 PST 2007


Author: resistor
Date: Sat Dec 15 22:07:23 2007
New Revision: 45069

URL: http://llvm.org/viewvc/llvm-project?rev=45069&view=rev
Log:
A few more comments.

Modified:
    llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp

Modified: llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp?rev=45069&r1=45068&r2=45069&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp (original)
+++ llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp Sat Dec 15 22:07:23 2007
@@ -311,6 +311,10 @@
   }
 }
 
+/// 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 @@
   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 @@
         // 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;





More information about the llvm-commits mailing list