diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-03-17 10:20:19 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-03-18 11:20:20 +0000 |
commit | 787c3076635cf117eb646c5a89a9014b2072fb44 (patch) | |
tree | 3c9c6c6d56e3900cf2255a5d1ade008ec6a40681 /compiler/optimizing/builder.cc | |
parent | b9d50a9829b795932eac4cc50a99b4ce80b0ecb4 (diff) | |
download | art-787c3076635cf117eb646c5a89a9014b2072fb44.tar.gz art-787c3076635cf117eb646c5a89a9014b2072fb44.tar.bz2 art-787c3076635cf117eb646c5a89a9014b2072fb44.zip |
Plug new optimizing compiler in compilation pipeline.
Also rename accessors to ART's conventions.
Change-Id: I344807055b98aa4b27215704ec362191464acecc
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r-- | compiler/optimizing/builder.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 8c6a8cb19f..39535e953b 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -56,8 +56,8 @@ HGraph* HGraphBuilder::BuildGraph(const DexFile::CodeItem& code_item) { entry_block_ = new (arena_) HBasicBlock(graph_); graph_->AddBlock(entry_block_); exit_block_ = new (arena_) HBasicBlock(graph_); - graph_->set_entry_block(entry_block_); - graph_->set_exit_block(exit_block_); + graph_->SetEntryBlock(entry_block_); + graph_->SetExitBlock(exit_block_); InitializeLocals(code_item.registers_size_); @@ -162,7 +162,7 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, int32_ HInstruction* first = LoadLocal(instruction.VRegA()); HInstruction* second = LoadLocal(instruction.VRegB()); current_block_->AddInstruction(new (arena_) HEqual(first, second)); - current_block_->AddInstruction(new (arena_) HIf(current_block_->last_instruction())); + current_block_->AddInstruction(new (arena_) HIf(current_block_->GetLastInstruction())); HBasicBlock* target = FindBlockStartingAt(instruction.GetTargetOffset() + dex_offset); DCHECK(target != nullptr); current_block_->AddSuccessor(target); @@ -243,7 +243,7 @@ void HGraphBuilder::UpdateLocal(int register_index, HInstruction* instruction) c HInstruction* HGraphBuilder::LoadLocal(int register_index) const { HLocal* local = GetLocalAt(register_index); current_block_->AddInstruction(new (arena_) HLoadLocal(local)); - return current_block_->last_instruction(); + return current_block_->GetLastInstruction(); } } // namespace art |