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

Issue 1961583002: Subzero WASM: avoid needless comparisons, add bounds check flag option (Closed)

Created:
4 years, 7 months ago by Eric Holk
Modified:
4 years, 7 months ago
Reviewers:
Karl, 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

Subzero WASM: avoid needless comparisons, add bounds check flag option Introduces a new BooleanVariable type which represents zero-extended variables generated from an i1, saving a pointer to the original i1. The Wasm frontend uses this to avoid comparing against 0 if possible when translating branches. This led to about a 12% improvement on the bzip2 spec benchmark. This change also adds the -wasm-disable-bounds-check command line option which omits bounds checking code. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4369 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=80ee5b3ff70567d7fead7102e06c69e79dcd8804

Patch Set 1 #

Patch Set 2 : Add BooleanVariable::classof #

Total comments: 6

Patch Set 3 : Code review feedback #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -18 lines) Patch
M src/IceClFlags.def View 1 2 1 chunk +5 lines, -1 line 2 comments Download
M src/IceOperand.h View 1 3 chunks +32 lines, -0 lines 0 comments Download
M src/WasmTranslator.cpp View 1 2 21 chunks +44 lines, -17 lines 4 comments Download

Messages

Total messages: 8 (2 generated)
Eric Holk
4 years, 7 months ago (2016-05-06 20:10:10 UTC) #2
Jim Stichnoth
https://codereview.chromium.org/1961583002/diff/20001/src/IceClFlags.def File src/IceClFlags.def (right): https://codereview.chromium.org/1961583002/diff/20001/src/IceClFlags.def#newcode350 src/IceClFlags.def:350: X(WasmNoBoundsCheck, bool, dev_opt_flag, "wasm-disable-bounds-check", \ Minor nit/request. Can we ...
4 years, 7 months ago (2016-05-06 20:37:52 UTC) #3
Eric Holk
https://codereview.chromium.org/1961583002/diff/20001/src/IceClFlags.def File src/IceClFlags.def (right): https://codereview.chromium.org/1961583002/diff/20001/src/IceClFlags.def#newcode350 src/IceClFlags.def:350: X(WasmNoBoundsCheck, bool, dev_opt_flag, "wasm-disable-bounds-check", \ On 2016/05/06 20:37:51, stichnot ...
4 years, 7 months ago (2016-05-06 20:56:21 UTC) #4
Jim Stichnoth
lgtm https://codereview.chromium.org/1961583002/diff/40001/src/IceClFlags.def File src/IceClFlags.def (right): https://codereview.chromium.org/1961583002/diff/40001/src/IceClFlags.def#newcode351 src/IceClFlags.def:351: cl::desc("Omit bounds checking code in WASM frontend"), \ ...
4 years, 7 months ago (2016-05-06 21:09:17 UTC) #5
Eric Holk
Committed patchset #3 (id:40001) manually as 80ee5b3ff70567d7fead7102e06c69e79dcd8804 (presubmit successful).
4 years, 7 months ago (2016-05-06 21:28:08 UTC) #7
Eric Holk
4 years, 7 months ago (2016-05-06 21:28:15 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1961583002/diff/40001/src/IceClFlags.def
File src/IceClFlags.def (right):

https://codereview.chromium.org/1961583002/diff/40001/src/IceClFlags.def#newc...
src/IceClFlags.def:351: cl::desc("Omit bounds checking code in WASM frontend"), 
                  \
On 2016/05/06 21:09:17, stichnot wrote:
> s/Omit/Add/

Done.

https://codereview.chromium.org/1961583002/diff/40001/src/WasmTranslator.cpp
File src/WasmTranslator.cpp (right):

https://codereview.chromium.org/1961583002/diff/40001/src/WasmTranslator.cpp#...
src/WasmTranslator.cpp:397: Ice::Variable *Dest = nullptr;
On 2016/05/06 21:09:17, stichnot wrote:
> s/Ice::Variable/Variable/

Done. I had to add `using Variable = Ice::Variable` to the class.

https://codereview.chromium.org/1961583002/diff/40001/src/WasmTranslator.cpp#...
src/WasmTranslator.cpp:978: if (!CondBool) {
On 2016/05/06 21:09:17, stichnot wrote:
> if (CondBool == nullptr)

Done.

Powered by Google App Engine
This is Rietveld 408576698