diff options
| author | 2014-06-19 14:59:05 +0100 | |
|---|---|---|
| committer | 2014-06-19 17:01:02 +0100 | |
| commit | 622bdbe6c295b08d06dfaa8d896b9ca152aa899c (patch) | |
| tree | b4f48348ef21ebc58641ffe776ff5d975e3d0a78 /compiler/dex/mir_optimization_test.cc | |
| parent | 995b32cc8e94a9730d6cf663a23afc9c997c1771 (diff) | |
Fix topological ordering and use it for optimizations.
Use the topological sort order for ClassInitCheckElimination
and NullCheckEliminationAndTypeInference.
Change-Id: I315ca7f300dd11390f48aefebfe988baf91bdcf1
Diffstat (limited to 'compiler/dex/mir_optimization_test.cc')
| -rw-r--r-- | compiler/dex/mir_optimization_test.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/dex/mir_optimization_test.cc b/compiler/dex/mir_optimization_test.cc index 29c353a4e6..9b2e798383 100644 --- a/compiler/dex/mir_optimization_test.cc +++ b/compiler/dex/mir_optimization_test.cc @@ -190,10 +190,12 @@ class ClassInitCheckEliminationTest : public testing::Test { void PerformClassInitCheckElimination() { cu_.mir_graph->SSATransformationStart(); cu_.mir_graph->ComputeDFSOrders(); + cu_.mir_graph->ComputeDominators(); + cu_.mir_graph->ComputeTopologicalSortOrder(); cu_.mir_graph->SSATransformationEnd(); bool gate_result = cu_.mir_graph->EliminateClassInitChecksGate(); ASSERT_TRUE(gate_result); - RepeatingPreOrderDfsIterator iterator(cu_.mir_graph.get()); + RepeatingTopologicalSortIterator iterator(cu_.mir_graph.get()); bool change = false; for (BasicBlock* bb = iterator.Next(change); bb != nullptr; bb = iterator.Next(change)) { change = cu_.mir_graph->EliminateClassInitChecks(bb); |