diff options
author | 2015-02-03 17:20:45 +0000 | |
---|---|---|
committer | 2015-02-03 17:20:46 +0000 | |
commit | bd17c3b46b035861ced434d6ed4d4fe183736e65 (patch) | |
tree | 94e7672c19da5381f6fa3d3cb1f2b4b96dfd0f8c /compiler/optimizing/code_generator.h | |
parent | bb2f65e64844bfca8d05d4c37991d858aa748648 (diff) | |
parent | 4c204bafbc8d596894f8cb8ec696f5be1c6f12d8 (diff) |
Merge "Use a different block order when not compiling baseline."
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r-- | compiler/optimizing/code_generator.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 45f02e53dc..ab63b911b2 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -113,10 +113,11 @@ class CodeGenerator { virtual size_t GetWordSize() const = 0; virtual size_t GetFloatingPointSpillSlotSize() const = 0; virtual uintptr_t GetAddressOf(HBasicBlock* block) const = 0; - void ComputeFrameSize(size_t number_of_spill_slots, - size_t maximum_number_of_live_core_registers, - size_t maximum_number_of_live_fp_registers, - size_t number_of_out_slots); + void InitializeCodeGeneration(size_t number_of_spill_slots, + size_t maximum_number_of_live_core_registers, + size_t maximum_number_of_live_fp_registers, + size_t number_of_out_slots, + const GrowableArray<HBasicBlock*>& block_order); int32_t GetStackSlot(HLocal* local) const; Location GetTemporaryLocation(HTemporary* temp) const; @@ -181,8 +182,6 @@ class CodeGenerator { slow_paths_.Add(slow_path); } - void GenerateSlowPaths(); - void BuildMappingTable(std::vector<uint8_t>* vector, DefaultSrcMap* src_map) const; void BuildVMapTable(std::vector<uint8_t>* vector) const; void BuildNativeGCMap( @@ -253,6 +252,8 @@ class CodeGenerator { compiler_options_(compiler_options), pc_infos_(graph->GetArena(), 32), slow_paths_(graph->GetArena(), 8), + block_order_(nullptr), + current_block_index_(0), is_leaf_(true), stack_map_stream_(graph->GetArena()) {} @@ -312,6 +313,7 @@ class CodeGenerator { private: void InitLocations(HInstruction* instruction); size_t GetStackOffsetOfSavedRegister(size_t index); + void CompileInternal(CodeAllocator* allocator, bool is_baseline); HGraph* const graph_; const CompilerOptions& compiler_options_; @@ -319,6 +321,13 @@ class CodeGenerator { GrowableArray<PcInfo> pc_infos_; GrowableArray<SlowPathCode*> slow_paths_; + // The order to use for code generation. + const GrowableArray<HBasicBlock*>* block_order_; + + // The current block index in `block_order_` of the block + // we are generating code for. + size_t current_block_index_; + bool is_leaf_; StackMapStream stack_map_stream_; |