aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/RegAllocPBQP.h
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2013-11-09 02:01:25 +0000
committerNick Lewycky <nicholas@mxc.ca>2013-11-09 02:01:25 +0000
commitceb0d9c085492151f8e4538119bf3de29ff935c0 (patch)
tree941ab6b15637775fb3922f4d31e5b5c7e27990a2 /include/llvm/CodeGen/RegAllocPBQP.h
parentd4f5a615674aaabeee4e444e708d1fa00a41495e (diff)
downloadexternal_llvm-ceb0d9c085492151f8e4538119bf3de29ff935c0.zip
external_llvm-ceb0d9c085492151f8e4538119bf3de29ff935c0.tar.gz
external_llvm-ceb0d9c085492151f8e4538119bf3de29ff935c0.tar.bz2
Revert r194300 which broke the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/RegAllocPBQP.h')
-rw-r--r--include/llvm/CodeGen/RegAllocPBQP.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/RegAllocPBQP.h b/include/llvm/CodeGen/RegAllocPBQP.h
index 7472e5a..6f2d139 100644
--- a/include/llvm/CodeGen/RegAllocPBQP.h
+++ b/include/llvm/CodeGen/RegAllocPBQP.h
@@ -52,22 +52,22 @@ namespace llvm {
/// PBQPBuilder you are unlikely to need this: Nodes and options for all
/// vregs will already have been set up for you by the base class.
template <typename AllowedRegsItr>
- void recordVReg(unsigned vreg, PBQP::Graph::NodeId nodeId,
+ void recordVReg(unsigned vreg, PBQP::Graph::NodeItr node,
AllowedRegsItr arBegin, AllowedRegsItr arEnd) {
- assert(node2VReg.find(nodeId) == node2VReg.end() && "Re-mapping node.");
+ assert(node2VReg.find(node) == node2VReg.end() && "Re-mapping node.");
assert(vreg2Node.find(vreg) == vreg2Node.end() && "Re-mapping vreg.");
assert(allowedSets[vreg].empty() && "vreg already has pregs.");
- node2VReg[nodeId] = vreg;
- vreg2Node[vreg] = nodeId;
+ node2VReg[node] = vreg;
+ vreg2Node[vreg] = node;
std::copy(arBegin, arEnd, std::back_inserter(allowedSets[vreg]));
}
/// Get the virtual register corresponding to the given PBQP node.
- unsigned getVRegForNode(PBQP::Graph::NodeId nodeId) const;
+ unsigned getVRegForNode(PBQP::Graph::ConstNodeItr node) const;
/// Get the PBQP node corresponding to the given virtual register.
- PBQP::Graph::NodeId getNodeForVReg(unsigned vreg) const;
+ PBQP::Graph::NodeItr getNodeForVReg(unsigned vreg) const;
/// Returns true if the given PBQP option represents a physical register,
/// false otherwise.
@@ -92,8 +92,9 @@ namespace llvm {
private:
- typedef std::map<PBQP::Graph::NodeId, unsigned> Node2VReg;
- typedef DenseMap<unsigned, PBQP::Graph::NodeId> VReg2Node;
+ typedef std::map<PBQP::Graph::ConstNodeItr, unsigned,
+ PBQP::NodeItrComparator> Node2VReg;
+ typedef DenseMap<unsigned, PBQP::Graph::NodeItr> VReg2Node;
typedef DenseMap<unsigned, AllowedSet> AllowedSetMap;
PBQP::Graph graph;