summaryrefslogtreecommitdiff
path: root/compiler/optimizing/ssa_liveness_analysis.h
diff options
context:
space:
mode:
author Matthew Gharrity <gharrma@google.com> 2016-08-12 16:10:45 +0000
committer Matthew Gharrity <gharrma@google.com> 2016-08-12 13:30:38 -0700
commit2ccae4a5fe6efbebd22cc2ad3a845829b695f670 (patch)
tree43b269041f0ed7144ca223da20623727e5d59722 /compiler/optimizing/ssa_liveness_analysis.h
parent82d33b295fecf472a98435b7fc8e4652d4c78542 (diff)
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
Diffstat (limited to 'compiler/optimizing/ssa_liveness_analysis.h')
-rw-r--r--compiler/optimizing/ssa_liveness_analysis.h4
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_) {