summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-03-20 01:07:47 +0000
committerEric Christopher <echristo@apple.com>2012-03-20 01:07:47 +0000
commit1a06cc9ae62d14f8e37ba88ccbaf9aaec49aaa17 (patch)
tree3c364f7838c1cb96a5fbbfd10eb63e44054aa88e /llvm/lib/CodeGen
parente344486e631b2a1d5bc14efcd0a92570dd89d7c1 (diff)
downloadbcm5719-llvm-1a06cc9ae62d14f8e37ba88ccbaf9aaec49aaa17.tar.gz
bcm5719-llvm-1a06cc9ae62d14f8e37ba88ccbaf9aaec49aaa17.zip
Use lookUpRegForValue here instead of duplicating the code.
llvm-svn: 153071
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index b5470bbd7a5..7c45f049821 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -136,15 +136,8 @@ unsigned FastISel::getRegForValue(const Value *V) {
return 0;
}
- // Look up the value to see if we already have a register for it. We
- // cache values defined by Instructions across blocks, and other values
- // only locally. This is because Instructions already have the SSA
- // def-dominates-use requirement enforced.
- DenseMap<const Value *, unsigned>::iterator I = FuncInfo.ValueMap.find(V);
- if (I != FuncInfo.ValueMap.end())
- return I->second;
-
- unsigned Reg = LocalValueMap[V];
+ // Look up the value to see if we already have a register for it.
+ unsigned Reg = lookUpRegForValue(V);
if (Reg != 0)
return Reg;
OpenPOWER on IntegriCloud