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.
diff --git a/vm/compiler/codegen/Optimizer.h b/vm/compiler/codegen/Optimizer.h
index 487e864..713aa41 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);