From e196567b50a084b163937ea9605b51ee1e48adeb Mon Sep 17 00:00:00 2001 From: buzbee Date: Sun, 11 Mar 2012 18:39:19 -0700 Subject: SSA rework and support compiler temps in the frame Add ability for the compiler to allocate new frame temporaries that play nicely with the register allocation mechanism. To do this we assign negative virtual register numbers and give them SSA names. As part of this change, I did a general cleanup of the ssa naming. An ssa name (or SReg) is in index into an array of (virtual reg, subscript) pairs. Previously, 16 bits were allocated for the reg and the subscript. This CL expands the virtual reg and subscript to 32 bits each. Method* is now treated as a RegLocation, and will be subject to temp register tracking and reuse. This CL does not yet include support for promotion of Method* - that will show up in the next one. Also included is the beginning of a basic block optimization pass (not yet in a runable state, so conditionally compiled out). (cherry picked from commit f689ffec8827f1dd6b31084f8a6bb240338c7acf) Change-Id: Ibbdeb97fe05d0e33c1f4a9a6ccbdef1cac7646fc --- src/compiler/Dataflow.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/compiler/Dataflow.h') diff --git a/src/compiler/Dataflow.h b/src/compiler/Dataflow.h index a9917a3396..2df9373b85 100644 --- a/src/compiler/Dataflow.h +++ b/src/compiler/Dataflow.h @@ -115,7 +115,7 @@ struct BasicBlockDataFlow { ArenaBitVector* defV; ArenaBitVector* liveInV; ArenaBitVector* phiV; - int* dalvikToSSAMap; + int* vRegToSSAMap; ArenaBitVector* endingNullCheckV; }; @@ -147,13 +147,10 @@ struct ArrayAccessInfo { int minC; // For DIV - will affect lower bound checking }; -#define ENCODE_REG_SUB(r,s) ((s<<16) | r) -#define DECODE_REG(v) (v & 0xffff) -#define DECODE_SUB(v) (((unsigned int) v) >> 16) - - void oatMethodNullCheckElimination(CompilationUnit*); +void oatMethodBasicBlockOptimization(CompilationUnit*); + } // namespace art #endif // ART_SRC_COMPILER_DATAFLOW_H_ -- cgit v1.2.3-59-g8ed1b