summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_builder.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2016-10-27 15:44:54 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-10-27 15:44:55 +0000
commit384cb6674b967a9c58da9ad70fd6f98caa1d8691 (patch)
treeb75a3309609ebbcd0d9d8d8b4297db82e80e988a /compiler/optimizing/instruction_builder.cc
parenta908348b4388854dab0b655b55dbeac1ecec2949 (diff)
parent2c45bc9137c29f886e69923535aff31a74d90829 (diff)
Merge "Remove H[Reverse]PostOrderIterator and HInsertionOrderIterator."
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r--compiler/optimizing/instruction_builder.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index 613e00843f..c8c4ca76fd 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -81,8 +81,7 @@ void HInstructionBuilder::InitializeBlockLocals() {
// locals (guaranteed by HGraphBuilder) and that all try blocks have been
// visited already (from HTryBoundary scoping and reverse post order).
bool catch_block_visited = false;
- for (HReversePostOrderIterator it(*graph_); !it.Done(); it.Advance()) {
- HBasicBlock* current = it.Current();
+ for (HBasicBlock* current : graph_->GetReversePostOrder()) {
if (current == current_block_) {
catch_block_visited = true;
} else if (current->IsTryBlock()) {
@@ -276,8 +275,8 @@ bool HInstructionBuilder::Build() {
FindNativeDebugInfoLocations(native_debug_info_locations);
}
- for (HReversePostOrderIterator block_it(*graph_); !block_it.Done(); block_it.Advance()) {
- current_block_ = block_it.Current();
+ for (HBasicBlock* block : graph_->GetReversePostOrder()) {
+ current_block_ = block;
uint32_t block_dex_pc = current_block_->GetDexPc();
InitializeBlockLocals();