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/frontend.h b/src/compiler/frontend.h
index f7e76f8..fb32cdd 100644
--- a/src/compiler/frontend.h
+++ b/src/compiler/frontend.h
@@ -49,7 +49,7 @@
*/
#define MAX_ASSEMBLER_RETRIES 50
-/* Suppress optimization if corresponding bit set */
+// Suppress optimization if corresponding bit set.
enum opt_control_vector {
kLoadStoreElimination = 0,
kLoadHoisting,
@@ -64,7 +64,7 @@
kPromoteCompilerTemps,
};
-/* Force code generation paths for testing */
+// Force code generation paths for testing.
enum debugControlVector {
kDebugDisplayMissingTargets,
kDebugVerbose,
@@ -86,14 +86,14 @@
};
enum OatMethodAttributes {
- kIsCallee = 0, /* Code is part of a callee (invoked by a hot trace) */
- kIsHot, /* Code is part of a hot trace */
- kIsLeaf, /* Method is leaf */
- kIsEmpty, /* Method is empty */
- kIsThrowFree, /* Method doesn't throw */
- kIsGetter, /* Method fits the getter pattern */
- kIsSetter, /* Method fits the setter pattern */
- kCannotCompile, /* Method cannot be compiled */
+ kIsCallee = 0, // Code is part of a callee (invoked by a hot trace).
+ kIsHot, // Code is part of a hot trace.
+ kIsLeaf, // Method is leaf.
+ kIsEmpty, // Method is empty.
+ kIsThrowFree, // Method doesn't throw.
+ kIsGetter, // Method fits the getter pattern.
+ kIsSetter, // Method fits the setter pattern.
+ kCannotCompile, // Method cannot be compiled.
};
#define METHOD_IS_CALLEE (1 << kIsCallee)
@@ -128,7 +128,7 @@
private:
UniquePtr<llvm::LLVMContext> llvm_context_;
- llvm::Module* llvm_module_; // Managed by context_
+ llvm::Module* llvm_module_; // Managed by context_.
UniquePtr<art::greenland::IntrinsicHelper> intrinsic_helper_;
UniquePtr<art::greenland::IRBuilder> ir_builder_;
};