mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Do one map lookup instead of two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104645 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -99,8 +99,9 @@ unsigned FastISel::getRegForValue(const Value *V) {
|
|||||||
// cache values defined by Instructions across blocks, and other values
|
// cache values defined by Instructions across blocks, and other values
|
||||||
// only locally. This is because Instructions already have the SSA
|
// only locally. This is because Instructions already have the SSA
|
||||||
// def-dominates-use requirement enforced.
|
// def-dominates-use requirement enforced.
|
||||||
if (ValueMap.count(V))
|
DenseMap<const Value *, unsigned>::iterator I = ValueMap.find(V);
|
||||||
return ValueMap[V];
|
if (I != ValueMap.end())
|
||||||
|
return I->second;
|
||||||
unsigned Reg = LocalValueMap[V];
|
unsigned Reg = LocalValueMap[V];
|
||||||
if (Reg != 0)
|
if (Reg != 0)
|
||||||
return Reg;
|
return Reg;
|
||||||
|
Reference in New Issue
Block a user