diff options
author | Owen Anderson <resistor@mac.com> | 2007-12-13 05:53:03 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-12-13 05:53:03 +0000 |
commit | 62d67dd3a3384d3899ca32aebd3d19bbf8b7d326 (patch) | |
tree | cef3f72aa6dda24e30917e41d720be56f9ed959f | |
parent | 4ba08ecbcf7f784ec1d8ece7f062c529b668085a (diff) |
Add register pairs to the list to check for local interferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44987 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/StrongPHIElimination.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index eef10ef3c0..9b1c163dcf 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/lib/CodeGen/StrongPHIElimination.cpp @@ -99,7 +99,8 @@ namespace { std::vector<DomForestNode*> computeDomForest(std::set<unsigned>& instrs); void processPHIUnion(MachineInstr* Inst, std::set<unsigned>& PHIUnion, - std::vector<StrongPHIElimination::DomForestNode*>& DF); + std::vector<StrongPHIElimination::DomForestNode*>& DF, + std::vector<std::pair<unsigned, unsigned> >& locals); void breakCriticalEdges(MachineFunction &Fn); }; @@ -300,6 +301,10 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) { computeDomForest(PHIUnion); // Walk DomForest to resolve interferences + std::vector<std::pair<unsigned, unsigned> > localInterferences; + processPHIUnion(P, PHIUnion, DF, localInterferences); + + // FIXME: Check for local interferences ProcessedNames.insert(PHIUnion.begin(), PHIUnion.end()); ++P; @@ -308,7 +313,8 @@ void StrongPHIElimination::processBlock(MachineBasicBlock* MBB) { void StrongPHIElimination::processPHIUnion(MachineInstr* Inst, std::set<unsigned>& PHIUnion, - std::vector<StrongPHIElimination::DomForestNode*>& DF) { + std::vector<StrongPHIElimination::DomForestNode*>& DF, + std::vector<std::pair<unsigned, unsigned> >& locals) { std::vector<DomForestNode*> worklist(DF.begin(), DF.end()); SmallPtrSet<DomForestNode*, 4> visited; @@ -323,7 +329,6 @@ void StrongPHIElimination::processPHIUnion(MachineInstr* Inst, visited.insert(DFNode); bool inserted = false; - SmallPtrSet<DomForestNode*, 4> interferences; for (DomForestNode::iterator CI = DFNode->begin(), CE = DFNode->end(); CI != CE; ++CI) { DomForestNode* child = *CI; @@ -342,7 +347,8 @@ void StrongPHIElimination::processPHIUnion(MachineInstr* Inst, } } else if (isLiveIn(Info, CInfo.DefInst->getParent()) || Info.DefInst->getParent() == CInfo.DefInst->getParent()) { - // FIXME: Add (p, c) to possible local interferences + // Add (p, c) to possible local interferences + locals.push_back(std::make_pair(DFNode->getReg(), child->getReg())); } if (!visited.count(child)) { |