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 | ccb398125662e36d7f65a66e950754f5ff02ef36 (patch) | |
| tree | 3f562dbcaab5e193d3fb99ce7bac952ca074db18 /llvm/lib/CodeGen | |
| parent | ce1489e575fbfad16289d69dcbfef8b77d3a1ac3 (diff) | |
| download | bcm5719-llvm-ccb398125662e36d7f65a66e950754f5ff02ef36.tar.gz bcm5719-llvm-ccb398125662e36d7f65a66e950754f5ff02ef36.zip | |
A few more comments.
llvm-svn: 45069
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/StrongPHIElimination.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp index 9b1c163dcfb..ee62a6b30c9 100644 --- a/llvm/lib/CodeGen/StrongPHIElimination.cpp +++ b/llvm/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; |

