diff options
| author | 2016-08-06 02:41:24 +0000 | |
|---|---|---|
| committer | 2016-08-06 02:41:24 +0000 | |
| commit | 1568ed9bd7e8fda112bc3afcf6d139637f2c65ce (patch) | |
| tree | 84f69ce45c614a0c015109cfa655f298a6463e3b /compiler/optimizing/optimizing_compiler.cc | |
| parent | 95a976a3d1842384ed71bcc6e6449de95ec69961 (diff) | |
| parent | 2cd05b7d9976c0c7fa74d58cb1608c809e5c37d3 (diff) | |
Merge "Add a register allocation strategy compiler option"
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
| -rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index d5b0d77fe5..30da69ffff 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -546,7 +546,8 @@ void OptimizingCompiler::RunArchOptimizations(InstructionSet instruction_set, NO_INLINE // Avoid increasing caller's frame size by large stack-allocated objects. static void AllocateRegisters(HGraph* graph, CodeGenerator* codegen, - PassObserver* pass_observer) { + PassObserver* pass_observer, + RegisterAllocator::Strategy strategy) { { PassScope scope(PrepareForRegisterAllocation::kPrepareForRegisterAllocationPassName, pass_observer); @@ -559,7 +560,7 @@ static void AllocateRegisters(HGraph* graph, } { PassScope scope(RegisterAllocator::kRegisterAllocatorPassName, pass_observer); - RegisterAllocator::Create(graph->GetArena(), codegen, liveness)->AllocateRegisters(); + RegisterAllocator::Create(graph->GetArena(), codegen, liveness, strategy)->AllocateRegisters(); } } @@ -626,7 +627,9 @@ void OptimizingCompiler::RunOptimizations(HGraph* graph, RunOptimizations(optimizations2, arraysize(optimizations2), pass_observer); RunArchOptimizations(driver->GetInstructionSet(), graph, codegen, pass_observer); - AllocateRegisters(graph, codegen, pass_observer); + RegisterAllocator::Strategy regalloc_strategy = + driver->GetCompilerOptions().GetRegisterAllocationStrategy(); + AllocateRegisters(graph, codegen, pass_observer, regalloc_strategy); } static ArenaVector<LinkerPatch> EmitAndSortLinkerPatches(CodeGenerator* codegen) { |