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

Issue 339783002: Add support for undef values in ICE IR. (Closed)

Created:
6 years, 6 months ago by wala
Modified:
6 years, 6 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

Add support for undef values in ICE IR. Undef values represent an arbitrary bit pattern and are lowered to a zero constant. IceOperand.h: Introduce a new ConstantUndef subclass of Constant. Add a getConstantZero() method. IceGlobalContext.h / IceGlobalContext.cpp: Implement pooling for ConstantUndefs. IceTargetLoweringX8632.cpp: Legalize ConstantUndefs to constant zeros. llvm2ice.cpp: Translate LLVM Undefs into ConstantUndefs. undef.ll: Test that undef values are recognized and legalized to zero. 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=d8f4a7d

Patch Set 1 #

Total comments: 8

Patch Set 2 : Lower undefs to constant 0 #

Total comments: 2

Patch Set 3 : Clarify that we expect backends to lower undef to 0 #

Total comments: 1

Patch Set 4 : Add comment about lowering to uninitialized registers #

Patch Set 5 : Comment on uninitialized registers #

Patch Set 6 : Comment about uninitialized registers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -0 lines) Patch
M src/IceGlobalContext.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 3 3 chunks +47 lines, -0 lines 0 comments Download
M src/IceOperand.h View 1 2 2 chunks +35 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
M src/llvm2ice.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
A tests_lit/llvm2ice_tests/undef.ll View 1 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
wala
6 years, 6 months ago (2014-06-16 23:38:40 UTC) #1
Jim Stichnoth
https://codereview.chromium.org/339783002/diff/1/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/339783002/diff/1/src/IceTargetLoweringX8632.cpp#newcode2156 src/IceTargetLoweringX8632.cpp:2156: // Undef values are lowered to a register. Maybe ...
6 years, 6 months ago (2014-06-17 06:28:08 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/339783002/diff/1/tests_lit/llvm2ice_tests/undef.ll File tests_lit/llvm2ice_tests/undef.ll (right): https://codereview.chromium.org/339783002/diff/1/tests_lit/llvm2ice_tests/undef.ll#newcode12 tests_lit/llvm2ice_tests/undef.ll:12: ; CHECK: return: Should we start using CHECK-LABEL more? ...
6 years, 6 months ago (2014-06-17 15:50:11 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/339783002/diff/1/tests_lit/llvm2ice_tests/undef.ll File tests_lit/llvm2ice_tests/undef.ll (right): https://codereview.chromium.org/339783002/diff/1/tests_lit/llvm2ice_tests/undef.ll#newcode12 tests_lit/llvm2ice_tests/undef.ll:12: ; CHECK: return: On 2014/06/17 15:50:11, jvoung wrote: > ...
6 years, 6 months ago (2014-06-17 17:51:13 UTC) #4
wala
https://codereview.chromium.org/339783002/diff/1/tests_lit/llvm2ice_tests/undef.ll File tests_lit/llvm2ice_tests/undef.ll (right): https://codereview.chromium.org/339783002/diff/1/tests_lit/llvm2ice_tests/undef.ll#newcode28 tests_lit/llvm2ice_tests/undef.ll:28: } On 2014/06/17 15:50:11, jvoung wrote: > Sometimes function ...
6 years, 6 months ago (2014-06-17 20:00:19 UTC) #5
wala
https://codereview.chromium.org/339783002/diff/1/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/339783002/diff/1/src/IceTargetLoweringX8632.cpp#newcode2156 src/IceTargetLoweringX8632.cpp:2156: // Undef values are lowered to a register. On ...
6 years, 6 months ago (2014-06-17 20:38:02 UTC) #6
wala
After a discussion with Jim, I've changed the implementation to lower undefs to a zero ...
6 years, 6 months ago (2014-06-17 21:34:20 UTC) #7
jvoung (off chromium)
On 2014/06/17 21:34:20, wala wrote: > After a discussion with Jim, I've changed the implementation ...
6 years, 6 months ago (2014-06-17 21:45:45 UTC) #8
jvoung (off chromium)
https://codereview.chromium.org/339783002/diff/80001/src/IceOperand.h File src/IceOperand.h (right): https://codereview.chromium.org/339783002/diff/80001/src/IceOperand.h#newcode210 src/IceOperand.h:210: // ConstantUndef represents an unspecified bit pattern. The comment ...
6 years, 6 months ago (2014-06-17 21:48:53 UTC) #9
wala
https://codereview.chromium.org/339783002/diff/80001/src/IceOperand.h File src/IceOperand.h (right): https://codereview.chromium.org/339783002/diff/80001/src/IceOperand.h#newcode210 src/IceOperand.h:210: // ConstantUndef represents an unspecified bit pattern. On 2014/06/17 ...
6 years, 6 months ago (2014-06-18 01:17:46 UTC) #10
Jim Stichnoth
lgtm https://codereview.chromium.org/339783002/diff/100001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/339783002/diff/100001/src/IceTargetLoweringX8632.cpp#newcode2156 src/IceTargetLoweringX8632.cpp:2156: // Lower undefs to zero. Another option is ...
6 years, 6 months ago (2014-06-18 13:43:33 UTC) #11
jvoung (off chromium)
lgtm too
6 years, 6 months ago (2014-06-18 15:34:14 UTC) #12
jvoung (off chromium)
On 2014/06/18 15:34:14, jvoung wrote: > lgtm too Oh, but please update the part of ...
6 years, 6 months ago (2014-06-18 15:55:57 UTC) #13
wala
The CQ bit was checked by wala@chromium.org
6 years, 6 months ago (2014-06-18 16:05:23 UTC) #14
wala
The CQ bit was unchecked by wala@chromium.org
6 years, 6 months ago (2014-06-18 16:05:23 UTC) #15
wala
6 years, 6 months ago (2014-06-18 16:55:06 UTC) #16
Message was sent while issue was closed.
Committed patchset #6 manually as rd8f4a7d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698