History log of /art/compiler/optimizing/register_allocator_graph_color.h
Revision Date Author Comments
e764d2e50c544c2cb98ee61a15d613161ac6bd17 05-Oct-2017 Vladimir Marko <vmarko@google.com> Use ScopedArenaAllocator for register allocation.

Memory needed to compile the two most expensive methods for
aosp_angler-userdebug boot image:
BatteryStats.dumpCheckinLocked() : 25.1MiB -> 21.1MiB
BatteryStats.dumpLocked(): 49.6MiB -> 42.0MiB
This is because all the memory previously used by Scheduler
is reused by the register allocator; the register allocator
has a higher peak usage of the ArenaStack.

And continue the "arena"->"allocator" renaming.

Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 64312607
Change-Id: Idfd79a9901552b5147ec0bf591cb38120de86b01
0ebe0d83138bba1996e9c8007969b5381d972b32 21-Sep-2017 Vladimir Marko <vmarko@google.com> ART: Introduce compiler data type.

Replace most uses of the runtime's Primitive in compiler
with a new class DataType. This prepares for introducing
new types, such as Uint8, that the runtime does not need
to know about.

Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 23964345
Change-Id: Iec2ad82454eec678fffcd8279a9746b90feb9b0c
70e97462116a47ef2e582ea29a037847debcc029 09-Aug-2016 Vladimir Marko <vmarko@google.com> Avoid excessive spill slots for slow paths.

Reducing the frame size makes stack maps smaller as we need
fewer bits for stack masks and some dex register locations
may use short location kind rather than long. On Nexus 9,
AOSP ToT, the boot.oat size reduction is
prebuilt multi-part boot image:
- 32-bit boot.oat: -416KiB (-0.6%)
- 64-bit boot.oat: -635KiB (-0.9%)
prebuilt multi-part boot image with read barrier:
- 32-bit boot.oat: -483KiB (-0.7%)
- 64-bit boot.oat: -703KiB (-0.9%)
on-device built single boot image:
- 32-bit boot.oat: -380KiB (-0.6%)
- 64-bit boot.oat: -632KiB (-0.9%)
on-device built single boot image with read barrier:
- 32-bit boot.oat: -448KiB (-0.6%)
- 64-bit boot.oat: -692KiB (-0.9%)

The other benefit is that at runtime, threads may need fewer
pages for their stacks, reducing overall memory usage.

We defer the calculation of the maximum spill size from
the main register allocator (linear scan or graph coloring)
to the RegisterAllocationResolver and do it based on the
live registers at slow path safepoints. The old notion of
an artificial slow path safepoint interval is removed as
it is no longer needed.

Test: Run ART test suite on host and Nexus 9.
Bug: 30212852
Change-Id: I40b3d114e278e2c5807982904fa49bf6642c6275
b6722fff3bedb867062b7ad369182f431dd98191 13-Aug-2016 Matthew Gharrity <gharrma@google.com> Color spill slots in gc regalloc

Coloring spill slots avoids pathologically large stack
sizes by reusing spill slots when possible.

Test: ART_TEST_OPTIMIZING_GRAPH_COLOR=true m test-art-host

Change-Id: I4b4aea859c78b0515758f8b057ee870dbbfc2300
2ccae4a5fe6efbebd22cc2ad3a845829b695f670 12-Aug-2016 Matthew Gharrity <gharrma@google.com> Revert "Revert "Iterative move coalescing for gc regalloc""

This reverts commit 6f61ee5623a676ce983ccfa1aba9b2ae1237e163,
and fixes the arena allocator issues in the original CL.
Functionality from the original CL has not changed.

Test: m valgrind-test-art-host-gtest-register_allocator_test
Test: ART_TEST_OPTIMIZING_GRAPH_COLOR=true m test-art-host-run-test

Change-Id: Idd979f4e03f0c2800e0c07a0a7d392c8a4230aab
6f61ee5623a676ce983ccfa1aba9b2ae1237e163 12-Aug-2016 Andreas Gampe <agampe@google.com> Revert "Iterative move coalescing for gc regalloc"

There are lifetime issues with allocators and coloring
iterations that got flagged by valgrind.

This reverts commit 465ed699e810868fe5bb39730e6d149a4734372d.

Change-Id: I9e08172321af61d109c116a4f0742fa809e8094b
Test: m test-art-host
465ed699e810868fe5bb39730e6d149a4734372d 22-Jul-2016 Matthew Gharrity <gharrma@google.com> Iterative move coalescing for gc regalloc

Implement iterative move coalescing for graph coloring
register allocation. Based on Andrew Appel's implementation
in "Modern Compiler Implementation in Java", modified to
support constraints such as pair intervals.

Test: ART_TEST_OPTIMIZING_GRAPH_COLOR=true m test-art-host

Change-Id: I8642297d3bd798a4fc4de4b356ac3304098471a5
d9ffd0dd7266f6a5e76f29d98dbe1a04f64cbb9b 22-Jun-2016 Matthew Gharrity <gharrma@google.com> Implement a graph coloring register allocator

Test: m test-art-host

Change-Id: I8c0d77f339ab02b33588a54b96ecce5c8322cfce