Quick compiler: Single .so for all targets
With this CL, all targets can be built into a single .so (but
we're not yet doing so - the compiler driver needs to be reworked).
A new Codgen class is introduced (see compiler/codegen/codegen.h),
along with target-specific sub-classes ArmCodegen, MipsCodegens and
X86Codegen (see compiler/codegen/*/codegen_[Arm|Mips|X86].h).
Additional minor code, comment and format refactoring. Some source
files combined, temporary header files deleted and a few file
renames to better identify their function.
Next up is combining the Quick and Portable .so files.
Note: building all targets into libdvm-compiler.so increases its
size by 140K bytes. I'm inclined to not bother introducing conditional
compilation to limit code to the specific target - the added build and
testing complexity doesn't doesn't seem worth such a modest size savings.
Change-Id: Id9c5b4502ad6b77cdb31f71d3126f51a4f2e9dfe
diff --git a/src/compiler/dataflow.h b/src/compiler/dataflow.h
index 00e6487..28b9a32 100644
--- a/src/compiler/dataflow.h
+++ b/src/compiler/dataflow.h
@@ -33,17 +33,17 @@
kSetsConst,
kFormat35c,
kFormat3rc,
- kNullCheckSrc0, // Null check of uses[0]
- kNullCheckSrc1, // Null check of uses[1]
- kNullCheckSrc2, // Null check of uses[2]
- kNullCheckOut0, // Null check out outgoing arg0
- kDstNonNull, // May assume dst is non-null
- kRetNonNull, // May assume retval is non-null
- kNullTransferSrc0, // Object copy src[0] -> dst
- kNullTransferSrcN, // Phi null check state transfer
- kRangeCheckSrc1, // Range check of uses[1]
- kRangeCheckSrc2, // Range check of uses[2]
- kRangeCheckSrc3, // Range check of uses[3]
+ kNullCheckSrc0, // Null check of uses[0].
+ kNullCheckSrc1, // Null check of uses[1].
+ kNullCheckSrc2, // Null check of uses[2].
+ kNullCheckOut0, // Null check out outgoing arg0.
+ kDstNonNull, // May assume dst is non-null.
+ kRetNonNull, // May assume retval is non-null.
+ kNullTransferSrc0, // Object copy src[0] -> dst.
+ kNullTransferSrcN, // Phi null check state transfer.
+ kRangeCheckSrc1, // Range check of uses[1].
+ kRangeCheckSrc2, // Range check of uses[2].
+ kRangeCheckSrc3, // Range check of uses[3].
kFPA,
kFPB,
kFPC,
@@ -53,7 +53,7 @@
kRefA,
kRefB,
kRefC,
- kUsesMethodStar, // Implicit use of Method*
+ kUsesMethodStar, // Implicit use of Method*.
};
#define DF_NOP 0
@@ -147,8 +147,8 @@
struct ArrayAccessInfo {
int array_reg;
int iv_reg;
- int max_c; // For DIV - will affect upper bound checking
- int min_c; // For DIV - will affect lower bound checking
+ int max_c; // For DIV - will affect upper bound checking.
+ int min_c; // For DIV - will affect lower bound checking.
};
struct LoopInfo {
@@ -166,7 +166,8 @@
bool DoConstantPropogation(CompilationUnit* cu, BasicBlock* bb);
void CompilerInitializeSSAConversion(CompilationUnit* cu);
bool ClearVisitedFlag(struct CompilationUnit* cu, struct BasicBlock* bb);
-void DataFlowAnalysisDispatcher(CompilationUnit* cu, bool (*func)(CompilationUnit*, BasicBlock*), DataFlowAnalysisMode dfa_mode, bool is_iterative);
+void DataFlowAnalysisDispatcher(CompilationUnit* cu, bool (*func)(CompilationUnit*, BasicBlock*),
+ DataFlowAnalysisMode dfa_mode, bool is_iterative);
MIR* FindMoveResult(CompilationUnit* cu, BasicBlock* bb, MIR* mir);
void NullCheckElimination(CompilationUnit *cu);
void BasicBlockCombine(CompilationUnit* cu);