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

Issue 417353003: Fix bug when atomic load is fused with an arith op (and not in the entry BB) (Closed)

Created:
6 years, 4 months ago by jvoung (off chromium)
Modified:
6 years, 4 months ago
Reviewers:
Jim Stichnoth
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Fix bug when atomic load is fused with an arith op (and not in the entry BB) Normally, the FakeUse for preserving the atomic load ends up on the load's Dest. However, for fused load+add, the load is deleted, and its Dest is no longer defined. This trips up the liveness analysis when it happens on a non-entry block. So the FakeUse should be for the add's dest instead, in that case. We have no access to the add, so introduce a getLastInserted() helper. A couple of ways to do that: - modify insert() to track explicitly - rewind from Next one step Either that, or we disable the fusing for atomic loads. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3882 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=e6e497d

Patch Set 1 #

Patch Set 2 : or do getLast by rewinding from Next #

Total comments: 6

Patch Set 3 : rebase #

Patch Set 4 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -9 lines) Patch
M src/IceTargetLowering.h View 1 2 3 3 chunks +7 lines, -3 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 2 3 2 chunks +17 lines, -3 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 1 chunk +6 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll View 1 2 3 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
jvoung (off chromium)
6 years, 4 months ago (2014-07-29 00:52:13 UTC) #1
Jim Stichnoth
I think that this issue would be fixed more robustly by modifying the instruction fusing ...
6 years, 4 months ago (2014-07-29 17:54:09 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/417353003/diff/20001/src/IceTargetLowering.cpp File src/IceTargetLowering.cpp (right): https://codereview.chromium.org/417353003/diff/20001/src/IceTargetLowering.cpp#newcode56 src/IceTargetLowering.cpp:56: --I; On 2014/07/29 17:54:09, stichnot wrote: > do { ...
6 years, 4 months ago (2014-07-30 15:17:14 UTC) #3
jvoung (off chromium)
6 years, 4 months ago (2014-07-30 17:06:09 UTC) #4
Message was sent while issue was closed.
Committed patchset #4 manually as re6e497d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698