diff options
author | Owen Anderson <resistor@mac.com> | 2007-12-16 04:07:23 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-12-16 04:07:23 +0000 |
commit | 965b4677670ad6103cc95989c4baa57bb6d01e83 (patch) | |
tree | 93f745fcac83eb6324b053a73c2f4d8261f898c1 | |
parent | cdd0417ba3ec6c4138e87b2d5472f951bb7902c8 (diff) |
A few more comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45069 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/StrongPHIElimination.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index 9b1c163dcf..ee62a6b30c 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/lib/CodeGen/StrongPHIElimination.cpp @@ -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; |