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

Issue 1152783006: Subzero: Fold the load instruction into the next cast instruction. (Closed)

Created:
5 years, 6 months ago by Jim Stichnoth
Modified:
5 years, 6 months ago
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: Fold the load instruction into the next cast instruction. This is similar to the way a load instruction may be folded into the next arithmetic instruction. Usually the effect is to improve a sequence like: mov ax, WORD PTR [mem] movsx eax, ax into this: movsx eax, WORD PTR [mem] without actually improving register allocation, though other kinds of casts may have different improvements. Existing tests needed to be fixed when they "inadvertently" did a cast to i32 return type and triggered the optimization when it wasn't wanted. These were fixed by inserting a "dummy" instruction between the load and the cast. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4095 R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=c77f817f923b2fcbf043da76e1a3066f7729aef2

Patch Set 1 #

Total comments: 2

Patch Set 2 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -42 lines) Patch
M src/IceTargetLoweringX8632.cpp View 1 7 chunks +70 lines, -38 lines 0 comments Download
M tests_lit/llvm2ice_tests/8bit.pnacl.ll View 2 chunks +4 lines, -2 lines 0 comments Download
A tests_lit/llvm2ice_tests/load_cast.ll View 1 chunk +266 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll View 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Jim Stichnoth
This appears to give a 1% gain in geomean across spec2k components.
5 years, 6 months ago (2015-05-30 00:26:34 UTC) #2
jvoung (off chromium)
lgtm https://codereview.chromium.org/1152783006/diff/1/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/1152783006/diff/1/src/IceTargetLoweringX8632.cpp#newcode3980 src/IceTargetLoweringX8632.cpp:3980: // Fuse this load with a subsequent Arithmetic ...
5 years, 6 months ago (2015-05-31 17:27:56 UTC) #3
Jim Stichnoth
Committed patchset #2 (id:20001) manually as c77f817f923b2fcbf043da76e1a3066f7729aef2 (presubmit successful).
5 years, 6 months ago (2015-06-01 06:34:49 UTC) #4
Jim Stichnoth
5 years, 6 months ago (2015-06-01 06:35:12 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/1152783006/diff/1/src/IceTargetLoweringX8632.cpp
File src/IceTargetLoweringX8632.cpp (right):

https://codereview.chromium.org/1152783006/diff/1/src/IceTargetLoweringX8632....
src/IceTargetLoweringX8632.cpp:3980: // Fuse this load with a subsequent
Arithmetic instruction in the
On 2015/05/31 17:27:56, jvoung wrote:
> "Fuse ... Arithmetic or Cast..." but may need to reword a bit ?

Added a separate description for Cast.

Powered by Google App Engine
This is Rietveld 408576698