From d4dd255db1d110ceb5551f6d95ff31fb57420994 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 28 Feb 2014 10:23:58 +0000 Subject: Add codegen support to the optimizing compiler. Change-Id: I9aae76908ff1d6e64fb71a6718fc1426b67a5c28 --- compiler/optimizing/nodes.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/optimizing/nodes.cc') diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 9ec8e89ff6..aefb0898b9 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -26,7 +26,7 @@ void HGraph::AddBlock(HBasicBlock* block) { void HGraph::FindBackEdges(ArenaBitVector* visited) const { ArenaBitVector visiting(arena_, blocks_.Size(), false); - VisitBlockForBackEdges(GetEntryBlock(), visited, &visiting); + VisitBlockForBackEdges(entry_block_, visited, &visiting); } void HGraph::RemoveDeadBlocks(const ArenaBitVector& visited) const { @@ -75,10 +75,9 @@ void HGraph::BuildDominatorTree() { // have been processed. GrowableArray visits(arena_, blocks_.Size()); visits.SetSize(blocks_.Size()); - HBasicBlock* entry = GetEntryBlock(); - dominator_order_.Add(entry); - for (size_t i = 0; i < entry->successors()->Size(); i++) { - VisitBlockForDominatorTree(entry->successors()->Get(i), entry, &visits); + dominator_order_.Add(entry_block_); + for (size_t i = 0; i < entry_block_->successors()->Size(); i++) { + VisitBlockForDominatorTree(entry_block_->successors()->Get(i), entry_block_, &visits); } } @@ -122,6 +121,7 @@ void HGraph::VisitBlockForDominatorTree(HBasicBlock* block, } void HBasicBlock::AddInstruction(HInstruction* instruction) { + instruction->set_block(this); if (first_instruction_ == nullptr) { DCHECK(last_instruction_ == nullptr); first_instruction_ = last_instruction_ = instruction; -- cgit v1.2.3-59-g8ed1b