diff options
author | 2016-10-27 15:44:54 +0000 | |
---|---|---|
committer | 2016-10-27 15:44:55 +0000 | |
commit | 384cb6674b967a9c58da9ad70fd6f98caa1d8691 (patch) | |
tree | b75a3309609ebbcd0d9d8d8b4297db82e80e988a /compiler/optimizing/ssa_liveness_analysis.cc | |
parent | a908348b4388854dab0b655b55dbeac1ecec2949 (diff) | |
parent | 2c45bc9137c29f886e69923535aff31a74d90829 (diff) |
Merge "Remove H[Reverse]PostOrderIterator and HInsertionOrderIterator."
Diffstat (limited to 'compiler/optimizing/ssa_liveness_analysis.cc')
-rw-r--r-- | compiler/optimizing/ssa_liveness_analysis.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/optimizing/ssa_liveness_analysis.cc b/compiler/optimizing/ssa_liveness_analysis.cc index 76cf8fe1ae..e8e12e1a55 100644 --- a/compiler/optimizing/ssa_liveness_analysis.cc +++ b/compiler/optimizing/ssa_liveness_analysis.cc @@ -139,7 +139,7 @@ static void RecursivelyProcessInputs(HInstruction* current, void SsaLivenessAnalysis::ComputeLiveRanges() { // Do a post order visit, adding inputs of instructions live in the block where // that instruction is defined, and killing instructions that are being visited. - for (HBasicBlock* block : LinearPostOrder(graph_->GetLinearOrder())) { + for (HBasicBlock* block : ReverseRange(graph_->GetLinearOrder())) { BitVector* kill = GetKillSet(*block); BitVector* live_in = GetLiveInSet(*block); @@ -256,15 +256,13 @@ void SsaLivenessAnalysis::ComputeLiveInAndLiveOutSets() { do { changed = false; - for (HPostOrderIterator it(*graph_); !it.Done(); it.Advance()) { - const HBasicBlock& block = *it.Current(); - + for (const HBasicBlock* block : graph_->GetPostOrder()) { // The live_in set depends on the kill set (which does not // change in this loop), and the live_out set. If the live_out // set does not change, there is no need to update the live_in set. - if (UpdateLiveOut(block) && UpdateLiveIn(block)) { + if (UpdateLiveOut(*block) && UpdateLiveIn(*block)) { if (kIsDebugBuild) { - CheckNoLiveInIrreducibleLoop(block); + CheckNoLiveInIrreducibleLoop(*block); } changed = true; } |