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

Issue 1233903002: Factor out legalization of undef, and handle more cases for ARM. (Closed)

Created:
5 years, 5 months ago by jvoung (off chromium)
Modified:
5 years, 5 months ago
Reviewers:
Jim Stichnoth, John
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

Factor out legalization of undef, and handle more cases for ARM. By factoring out legalizeUndef(), we can use the same logic in prelowerPhis which may help if we ever change the value used (though if we switch from zero-ing out regs to using uninitialized regs, it'll take more work -- e.g., can't return a 64-bit reg). For x86, use legalizeUndef where it's clear that the value is immediately fed to loOperand/hiOperand then another legalize() call. Otherwise, leave the general X = legalize(X); alone where the code is counting on that being the sole legalization. For x86 legalize(const64) is a pass-through, which can then be passed to loOperand/hiOperand nicely. However, for ARM, legalize(const64) may end up trying to copy the const64 to a register, but we don't have 64-bit registers. Instead do legalizeUndef(X) where x86 would have just done legalize(X). This happens to work because legalizeUndef doesn't try to copy to reg, and we immediately pass the result to loOperand/hiOperand() which then passes the result to a real legalization call. Add a few more undef tests. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=fbdd244013aad0808220386eb6bd17eb0635dd4c

Patch Set 1 #

Patch Set 2 : legalize more #

Patch Set 3 : format #

Patch Set 4 : reinstate one call #

Patch Set 5 : stuff #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -93 lines) Patch
M src/IceTargetLoweringARM32.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 22 chunks +60 lines, -39 lines 0 comments Download
M src/IceTargetLoweringX86Base.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 17 chunks +64 lines, -54 lines 0 comments Download
M tests_lit/llvm2ice_tests/bool-folding.ll View 1 chunk +11 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll View 1 chunk +10 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/rmw.ll View 1 chunk +12 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/switch-opt.ll View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/undef.ll View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
jvoung (off chromium)
5 years, 5 months ago (2015-07-13 18:31:25 UTC) #2
Jim Stichnoth
LGTM That said, this change makes me nervous because for new lowering code, I'm not ...
5 years, 5 months ago (2015-07-13 22:37:04 UTC) #3
jvoung (off chromium)
On 2015/07/13 22:37:04, stichnot wrote: > LGTM > > That said, this change makes me ...
5 years, 5 months ago (2015-07-14 17:11:23 UTC) #4
jvoung (off chromium)
5 years, 5 months ago (2015-07-15 19:36:24 UTC) #5
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
fbdd244013aad0808220386eb6bd17eb0635dd4c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698