History log of /art/compiler/dex/global_value_numbering_test.cc
Revision Date Author Comments
07206af370746e6d7cf528e655b4854e7a865cfa 29-Jul-2014 Vladimir Marko <vmarko@google.com> Reduce time and memory usage of GVN.

Filter out dead sregs in GVN. Reclaim memory after each LVN
in the GVN modification phase.

Bug: 16398693

(cherry picked from commit b19955d3c8fbd9588f7e17299e559d02938154b6)

Change-Id: I33c7912258a768b4c99d787056979fbc3b023b3b
b19955d3c8fbd9588f7e17299e559d02938154b6 29-Jul-2014 Vladimir Marko <vmarko@google.com> Reduce time and memory usage of GVN.

Filter out dead sregs in GVN. Reclaim memory after each LVN
in the GVN modification phase.

Bug: 16398693
Change-Id: I8c88c3009663754e1b66c0ef3f62c3b93276e385
1fd4821f6b3ac57a44c2ce91025686da4641d197 10-Jul-2014 Vladimir Marko <vmarko@google.com> Rewrite topological sort order and improve GVN.

Rewrite the topological sort order to include a full loop
before the blocks that go after the loop. Add a new iterator
class LoopRepeatingTopologicalSortIterator that differs from
the RepeatingTopologicalSortIterator by repeating only loops
and repeating them early. It returns to the loop head if the
head needs recalculation when we reach the end of the loop.

In GVN, use the new loop-repeating topological sort iterator
and for a loop head merge only the preceding blocks' LVNs
if we're not currently recalculating this loop.

Also fix LocalValueNumbering::InPlaceIntersectMaps() which
was keeping only the last element of the intersection, avoid
some unnecessary processing during LVN merge and add some
missing braces to MIRGraph::InferTypeAndSize().

Bug: 16398693

(cherry picked from 55fff044d3a4f7196098e25bab1dad106d9b54a2)

Change-Id: Id7bcd99c8abed1b7500b9ef723313d4c5fc6f1e8
55fff044d3a4f7196098e25bab1dad106d9b54a2 10-Jul-2014 Vladimir Marko <vmarko@google.com> Rewrite topological sort order and improve GVN.

Rewrite the topological sort order to include a full loop
before the blocks that go after the loop. Add a new iterator
class LoopRepeatingTopologicalSortIterator that differs from
the RepeatingTopologicalSortIterator by repeating only loops
and repeating them early. It returns to the loop head if the
head needs recalculation when we reach the end of the loop.

In GVN, use the new loop-repeating topological sort iterator
and for a loop head merge only the preceding blocks' LVNs
if we're not currently recalculating this loop.

Also fix LocalValueNumbering::InPlaceIntersectMaps() which
was keeping only the last element of the intersection, avoid
some unnecessary processing during LVN merge and add some
missing braces to MIRGraph::InferTypeAndSize().

Bug: 16398693
Change-Id: I4e10d4acb626a5b8a28ec0de106a7b37f9cbca32
acb4eb12108d5890bf722bed91f2e80708af0c75 17-Jul-2014 Vladimir Marko <vmarko@google.com> Fix GVN to handle normal paths leading to catch entry.

When the catch block is empty, the catch entry is actually
the normal path block after the try block. Fix the LVN
merge for catch entries that didn't expect it during GVN.

Bug: 16360024

(cherry-picked from 11ca61259be6ec8e03eaff1e98905232728b3d45)

Change-Id: Ifc771edfec702ab2f0ff50bf7f8e69c846d13a46
11ca61259be6ec8e03eaff1e98905232728b3d45 17-Jul-2014 Vladimir Marko <vmarko@google.com> Fix GVN to handle normal paths leading to catch entry.

When the catch block is empty, the catch entry is actually
the normal path block after the try block. Fix the LVN
merge for catch entries that didn't expect it during GVN.

Bug: 16360024
Change-Id: I9adfc3445245d3fa3c4809d4df1b7b76fbef5ff2
95a059793c4c194f026afc74c713cc295d75d91a 30-May-2014 Vladimir Marko <vmarko@google.com> Global Value Numbering.

Implement the Global Value Numbering for optimization
purposes. Use it for the null check and range check
elimination as the LVN used to do.

The order of evaluation of basic blocks needs improving as
we currently fail to recognize some obviously identical
values in methods with more than one loop. (There are three
disabled tests that check this. This is just a missed
optimization, not a correctness issue.)

Change-Id: I0d0ce16b2495b5a3b17ad1b2b32931cd69f5a25a