In bottom-up mode, defer the materialization of local constant values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-05-06 00:02:14 +00:00
parent a7a0ed7901
commit 97c94b8fc6

View File

@ -84,6 +84,17 @@ unsigned FastISel::getRegForValue(const Value *V) {
if (Reg != 0)
return Reg;
// In bottom-up mode, just create the virtual register which will be used
// to hold the value. It will be materialized later.
if (IsBottomUp) {
Reg = createResultReg(TLI.getRegClassFor(VT));
if (isa<Instruction>(V))
ValueMap[V] = Reg;
else
LocalValueMap[V] = Reg;
return Reg;
}
return materializeRegForValue(V, VT);
}