Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Issue 1373823006: Subzero. Fixes a bug in the register allocator range eviction. (Closed)

Created:
5 years, 2 months ago by John
Modified:
5 years, 2 months ago
Reviewers:
Jim Stichnoth, Karl, sehr
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Subzero. Fixes a bug in the register allocator. This bug was uncovered While implementing the llvm.nacl.atomic.cmpxchg lowering for i64 for ARM32. For reference, the lowering is retry: ldrexd tmp_i, tmp_i+1 [addr] cmp tmp_i+1, expected_i+1 cmpeq tmp_i, expected_i strexdeq success, new_i, new_i+1, [addr] movne expected_i+1, tmp_i+1 movne expected_i, tmp_i cmpeq success, #0 bne retry mov dest_i+1, tmp_i+1 mov dest_i, tmp_i The register allocator would allocate r4 to both success and new_i, which is clearly wrong (expected_i is alive thought the cmpxchg loop.) Adding a fake-use(new_i) after the loop caused the register allocator to fail due to the impossibility to allocate a register for an infinite weight register. The problem was being caused for not evicting live ranges that were assigned registers that alias the selected register. BUG= R=kschimpf@google.com, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=7cb12682204f56e0c49f695599c434f77ed6cf29

Patch Set 1 #

Patch Set 2 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -12 lines) Patch
M src/IceRegAlloc.cpp View 1 2 chunks +8 lines, -12 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
John
5 years, 2 months ago (2015-10-01 20:30:28 UTC) #2
Jim Stichnoth
lgtm
5 years, 2 months ago (2015-10-01 21:14:53 UTC) #3
Karl
lgtm
5 years, 2 months ago (2015-10-01 21:37:03 UTC) #4
John
5 years, 2 months ago (2015-10-01 22:13:28 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
7cb12682204f56e0c49f695599c434f77ed6cf29 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698