diff options
author | Andreas Gampe <agampe@google.com> | 2015-01-22 20:39:27 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-01-26 14:30:40 -0800 |
commit | 0b9203e7996ee1856f620f95d95d8a273c43a3df (patch) | |
tree | a9715986cfdbb21e4d64f72b56fac255cc8b9309 /compiler/dex/quick/mir_to_lir.h | |
parent | 4dfe58d8f2d398963f31831a57fbd12e282e1196 (diff) | |
download | android_art-0b9203e7996ee1856f620f95d95d8a273c43a3df.tar.gz android_art-0b9203e7996ee1856f620f95d95d8a273c43a3df.tar.bz2 android_art-0b9203e7996ee1856f620f95d95d8a273c43a3df.zip |
ART: Some Quick cleanup
Make several fields const in CompilationUnit. May benefit some Mir2Lir
code that repeats tests, and in general immutability is good.
Remove compiler_internals.h and refactor some other headers to reduce
overly broad imports (and thus forced recompiles on changes).
Change-Id: I898405907c68923581373b5981d8a85d2e5d185a
Diffstat (limited to 'compiler/dex/quick/mir_to_lir.h')
-rw-r--r-- | compiler/dex/quick/mir_to_lir.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/compiler/dex/quick/mir_to_lir.h b/compiler/dex/quick/mir_to_lir.h index fabf941e4f..64ecf946f7 100644 --- a/compiler/dex/quick/mir_to_lir.h +++ b/compiler/dex/quick/mir_to_lir.h @@ -17,15 +17,14 @@ #ifndef ART_COMPILER_DEX_QUICK_MIR_TO_LIR_H_ #define ART_COMPILER_DEX_QUICK_MIR_TO_LIR_H_ -#include "arch/instruction_set.h" #include "compiled_method.h" #include "dex/compiler_enums.h" -#include "dex/compiler_ir.h" +#include "dex/dex_flags.h" +#include "dex/dex_types.h" #include "dex/reg_location.h" #include "dex/reg_storage.h" #include "dex/backend.h" #include "dex/quick/resource_mask.h" -#include "driver/compiler_driver.h" #include "entrypoints/quick/quick_entrypoints_enum.h" #include "invoke_type.h" #include "leb128.h" @@ -125,10 +124,12 @@ namespace art { #define REG_USE23 (REG_USE2 | REG_USE3) #define REG_USE123 (REG_USE1 | REG_USE2 | REG_USE3) -// TODO: #includes need a cleanup -#ifndef INVALID_SREG -#define INVALID_SREG (-1) -#endif +/* + * Assembly is an iterative process, and usually terminates within + * two or three passes. This should be high enough to handle bizarre + * cases, but detect an infinite loop bug. + */ +#define MAX_ASSEMBLER_RETRIES 50 class BasicBlock; struct CallInfo; @@ -140,7 +141,6 @@ struct RegisterInfo; class DexFileMethodInliner; class MIRGraph; class MirMethodLoweringInfo; -class Mir2Lir; typedef int (*NextCallInsn)(CompilationUnit*, CallInfo*, int, const MethodReference& target_method, @@ -148,6 +148,7 @@ typedef int (*NextCallInsn)(CompilationUnit*, CallInfo*, int, uintptr_t direct_method, InvokeType type); typedef std::vector<uint8_t> CodeBuffer; +typedef uint32_t CodeOffset; // Native code offset in bytes. struct UseDefMasks { const ResourceMask* use_mask; // Resource mask for use. @@ -200,13 +201,6 @@ struct LIR { // Mask to denote sreg as the start of a 64-bit item. Must not interfere with low 16 bits. #define STARTING_WIDE_SREG 0x10000 -// TODO: replace these macros -#define SLOW_FIELD_PATH (cu_->enable_debug & (1 << kDebugSlowFieldPath)) -#define SLOW_INVOKE_PATH (cu_->enable_debug & (1 << kDebugSlowInvokePath)) -#define SLOW_STRING_PATH (cu_->enable_debug & (1 << kDebugSlowStringPath)) -#define SLOW_TYPE_PATH (cu_->enable_debug & (1 << kDebugSlowTypePath)) -#define EXERCISE_SLOWEST_STRING_PATH (cu_->enable_debug & (1 << kDebugSlowestStringPath)) - class Mir2Lir : public Backend { public: static constexpr bool kFailOnSizeError = true && kIsDebugBuild; |