From 46e2a3915aa68c77426b71e95b9f3658250646b7 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Mon, 16 Mar 2015 17:31:52 +0000 Subject: ART: Boolean simplifier The optimization recognizes the negation pattern generated by 'javac' and replaces it with a single condition. To this end, boolean values are now consistently assumed to be represented by an integer. This is a first optimization which deletes blocks from the HGraph and does so by replacing the corresponding entries with null. Hence, existing code can continue indexing the list of blocks with the block ID, but must check for null when iterating over the list. Change-Id: I7779da69cfa925c6521938ad0bcc11bc52335583 --- compiler/optimizing/graph_checker.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/graph_checker.cc') diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc index 76b9f4fe7e..09a3ae431f 100644 --- a/compiler/optimizing/graph_checker.cc +++ b/compiler/optimizing/graph_checker.cc @@ -227,13 +227,13 @@ void SSAChecker::CheckLoop(HBasicBlock* loop_header) { } else { HLoopInformation* loop_information = loop_header->GetLoopInformation(); HBasicBlock* first_predecessor = loop_header->GetPredecessors().Get(0); - if (loop_information->IsBackEdge(first_predecessor)) { + if (loop_information->IsBackEdge(*first_predecessor)) { AddError(StringPrintf( "First predecessor of loop header %d is a back edge.", id)); } HBasicBlock* second_predecessor = loop_header->GetPredecessors().Get(1); - if (!loop_information->IsBackEdge(second_predecessor)) { + if (!loop_information->IsBackEdge(*second_predecessor)) { AddError(StringPrintf( "Second predecessor of loop header %d is not a back edge.", id)); -- cgit v1.2.3-59-g8ed1b