diff options
| author | 2016-04-08 17:50:05 +0000 | |
|---|---|---|
| committer | 2016-04-08 17:50:05 +0000 | |
| commit | e835f3a2e4a7af404e61a88058712f77737d87cd (patch) | |
| tree | 1b8f14d3910377502c218971d5f538f694f7c01b /compiler/optimizing/instruction_builder.cc | |
| parent | 250a23c892bb809267325c0744c6f70fca49ac94 (diff) | |
| parent | c4ae916def97b9e1ef6df35c8fabb3921a0e380c (diff) | |
Merge changes from topic 'rr_barrier'
* changes:
Store precice set of which constructors require barriers
Revert "Revert "Check if we require barrier if we did not resolve classes""
Revert "Revert "Change RequiresConstructorBarrier default to yes""
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
| -rw-r--r-- | compiler/optimizing/instruction_builder.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index b0f0893720..06b39680b2 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -567,10 +567,10 @@ void HInstructionBuilder::Binop_22b(const Instruction& instruction, bool reverse UpdateLocal(instruction.VRegA(), current_block_->GetLastInstruction()); } -static bool RequiresConstructorBarrier(const DexCompilationUnit* cu, const CompilerDriver& driver) { +static bool RequiresConstructorBarrier(const DexCompilationUnit* cu, CompilerDriver* driver) { Thread* self = Thread::Current(); return cu->IsConstructor() - && driver.RequiresConstructorBarrier(self, cu->GetDexFile(), cu->GetClassDefIndex()); + && driver->RequiresConstructorBarrier(self, cu->GetDexFile(), cu->GetClassDefIndex()); } // Returns true if `block` has only one successor which starts at the next @@ -616,7 +616,7 @@ void HInstructionBuilder::BuildReturn(const Instruction& instruction, if (graph_->ShouldGenerateConstructorBarrier()) { // The compilation unit is null during testing. if (dex_compilation_unit_ != nullptr) { - DCHECK(RequiresConstructorBarrier(dex_compilation_unit_, *compiler_driver_)) + DCHECK(RequiresConstructorBarrier(dex_compilation_unit_, compiler_driver_)) << "Inconsistent use of ShouldGenerateConstructorBarrier. Should not generate a barrier."; } AppendInstruction(new (arena_) HMemoryBarrier(kStoreStore, dex_pc)); |