aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/Optimizer.h
diff options
context:
space:
mode:
authorBill Buzbee <buzbee@google.com>2009-09-23 17:17:35 -0700
committerBill Buzbee <buzbee@google.com>2009-10-30 14:33:08 -0700
commit1465db5ee2d3c4c4dcc8e017a294172e858765cb (patch)
tree618d010f0001f74ce4ad7f5664c1cf7d0a37aa1c /vm/compiler/codegen/Optimizer.h
parent113154c2cf1c09894c4426d30e37f03dd6fe4785 (diff)
Major registor allocation rework - stage 1.
Direct usage of registers abstracted out. Live values tracked locally. Redundant loads and stores suppressed. Address of registers and register pairs unified w/ single "location" mechanism Register types inferred using existing dataflow analysis pass. Interim (i.e. Hack) mechanism for storing register liveness info. Rewrite TBD. Stubbed-out code for linear scan allocation (for loop and long traces) Moved optimistic lock check for monitor-enter/exit inline for Thumb2 Minor restructuring, renaming and general cleanup of codegen Renaming of enums to follow coding convention Formatting fixes introduced by the enum renaming Rewrite of RallocUtil.c and addition of linear scan to come in stage 2.
Diffstat (limited to 'vm/compiler/codegen/Optimizer.h')
-rw-r--r--vm/compiler/codegen/Optimizer.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/vm/compiler/codegen/Optimizer.h b/vm/compiler/codegen/Optimizer.h
index 487e8648e..713aa4105 100644
--- a/vm/compiler/codegen/Optimizer.h
+++ b/vm/compiler/codegen/Optimizer.h
@@ -26,28 +26,14 @@
typedef enum optControlVector {
kLoadStoreElimination = 0,
kLoadHoisting,
+ kTrackLiveTemps,
+ kSuppressLoads,
} optControlVector;
/* Forward declarations */
struct CompilationUnit;
struct LIR;
-/*
- * Data structure tracking the mapping between a Dalvik register (pair) and a
- * native register (pair). The idea is to reuse the previously loaded value
- * if possible, otherwise to keep the value in a native register as long as
- * possible.
- */
-typedef struct RegisterScoreboard {
- BitVector *nullCheckedRegs; // Track which registers have been null-checked
- int liveDalvikReg; // Track which Dalvik register is live
- int nativeReg; // And the mapped native register
- int nativeRegHi; // And the mapped native register
- bool isWide; // Whether a pair of registers are alive
- int fp[32]; // Track the Dalvik register held in a SFP reg
- int nextFP; // Next index for FP register allocation
-} RegisterScoreboard;
-
void dvmCompilerApplyLocalOptimizations(struct CompilationUnit *cUnit,
struct LIR *head,
struct LIR *tail);