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

Issue 432613002: Subzero: Fix some issues related to legalization and undef handling. (Closed)

Created:
6 years, 4 months ago by wala
Modified:
6 years, 4 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Subzero: Fix some issues related to legalization and undef handling. 1. Much of the lowering code for vector operations was not properly checking that the input operand was in a register or memory. This problem could be exhibited by passing undef values as inputs. => Change the vector legalization code to legalize input operands to register or memory before producing instructions that use the operands. Also, append a suffix to the variable names in the vector legalization code to clarify the legalization status of the values. 2. Undef values should never be emitted directly. Rather, they should have been appropriately legalized to a zero value. => To enforce this, make ConstantUndef::emit() issue an error message. Do this in the x86 backend, as other backends may decide to treat undef values differently. 3. The regalloc_evict_non_overlap test was loading from an undef pointer. Subzero was not handling this correctly (the undef pointer was being emitted without being legalized), but it does not have to handle this case since PNaCl IR disallows undef pointers. => Fix the regalloc_evict_non_overlap test to use an inttoptr instead of directly loading from the undef pointer. Also, add an assert in IceTargetLoweringX8632::FormMemoryOperand() to make sure that undef pointers are never encountered. BUG=none R=jvoung@chromium.org, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=e377767

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix name of variable in comment and fix formatting. #

Total comments: 2

Patch Set 3 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+359 lines, -135 lines) Patch
M src/IceOperand.h View 1 chunk +2 lines, -4 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 19 chunks +148 lines, -121 lines 0 comments Download
M tests_lit/llvm2ice_tests/regalloc_evict_non_overlap.ll View 1 chunk +2 lines, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/undef.ll View 10 chunks +207 lines, -9 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
wala
6 years, 4 months ago (2014-07-30 23:20:26 UTC) #1
Jim Stichnoth
lgtm https://codereview.chromium.org/432613002/diff/1/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/432613002/diff/1/src/IceTargetLoweringX8632.cpp#newcode4073 src/IceTargetLoweringX8632.cpp:4073: (void)Ctx; Can you declare the function as "void ...
6 years, 4 months ago (2014-07-31 00:52:43 UTC) #2
jvoung (off chromium)
otherwise LGTM too https://codereview.chromium.org/432613002/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/432613002/diff/20001/src/IceTargetLoweringX8632.cpp#newcode2269 src/IceTargetLoweringX8632.cpp:2269: Operand *Src0RM = legalizeToVar(Src0, Legal_Reg | ...
6 years, 4 months ago (2014-07-31 15:42:45 UTC) #3
wala
https://codereview.chromium.org/432613002/diff/1/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/432613002/diff/1/src/IceTargetLoweringX8632.cpp#newcode4073 src/IceTargetLoweringX8632.cpp:4073: (void)Ctx; On 2014/07/31 00:52:42, stichnot wrote: > Can you ...
6 years, 4 months ago (2014-07-31 16:06:04 UTC) #4
wala
6 years, 4 months ago (2014-07-31 16:06:21 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 manually as re377767 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698