diff options
author | 2016-07-22 08:52:13 -0700 | |
---|---|---|
committer | 2016-08-11 13:17:02 -0700 | |
commit | 465ed699e810868fe5bb39730e6d149a4734372d (patch) | |
tree | a53b71b2bebb31e5e75b0c649cf7e48058728dee /compiler/optimizing/ssa_liveness_analysis.h | |
parent | 71572de11618275ac7a093a3bf3815c3dbdc2510 (diff) |
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
Diffstat (limited to 'compiler/optimizing/ssa_liveness_analysis.h')
-rw-r--r-- | compiler/optimizing/ssa_liveness_analysis.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/ssa_liveness_analysis.h b/compiler/optimizing/ssa_liveness_analysis.h index 346753b775..92788fe6b8 100644 --- a/compiler/optimizing/ssa_liveness_analysis.h +++ b/compiler/optimizing/ssa_liveness_analysis.h @@ -514,7 +514,9 @@ class LiveInterval : public ArenaObject<kArenaAllocSsaLiveness> { // Whether the interval requires a register rather than a stack location. // If needed for performance, this could be cached. - bool RequiresRegister() const { return FirstRegisterUse() != kNoLifetime; } + bool RequiresRegister() const { + return !HasRegister() && FirstRegisterUse() != kNoLifetime; + } size_t FirstUseAfter(size_t position) const { if (is_temp_) { |