diff options
author | 2016-08-26 11:31:48 -0700 | |
---|---|---|
committer | 2016-10-03 15:15:27 -0700 | |
commit | 281c681a0852c10f5ca99b351650b244e878aea3 (patch) | |
tree | 33036cbfb76ee497eedf60e0e5785a2267c9dd02 /compiler/optimizing/nodes.cc | |
parent | a845d07bbd57f8beaea8b4fb47192a3382ef25b2 (diff) |
A first implementation of a loop optimization framework.
Rationale:
We are planning to add more and more loop related optimizations
and this framework provides the basis to do so. For starters,
the framework optimizes dead induction, induction that can be
replaced with a simpler closed-form, and eliminates dead loops
completely (either pre-existing or as a result of induction
removal).
Speedup on e.g. Benchpress Loop is 73x (17.5us. -> 0.24us.)
[with the potential for more exploiting outer loop too]
Test: 618-checker-induction et al.
Change-Id: If80a809acf943539bf6726b0030dcabd50c9babc
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index ef9bf23a17..f1ca928851 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -522,7 +522,10 @@ static bool IsLinearOrderWellFormed(const HGraph& graph) { return true; } +// TODO: return order, and give only liveness analysis ownership of graph's linear_order_? void HGraph::Linearize() { + linear_order_.clear(); + // Create a reverse post ordering with the following properties: // - Blocks in a loop are consecutive, // - Back-edge is the last block before loop exits. |