[llvm-commits] [llvm] r103139 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Dan Gohman
gohman at apple.com
Wed May 5 17:02:14 PDT 2010
Author: djg
Date: Wed May 5 19:02:14 2010
New Revision: 103139
URL: http://llvm.org/viewvc/llvm-project?rev=103139&view=rev
Log:
In bottom-up mode, defer the materialization of local constant values.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=103139&r1=103138&r2=103139&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Wed May 5 19:02:14 2010
@@ -84,6 +84,17 @@
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);
}
More information about the llvm-commits
mailing list