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 Review URL: https://codereview.chromium.org/1961583002 .
diff --git a/src/IceClFlags.def b/src/IceClFlags.def index cfbf9aa..e9d0822 100644 --- a/src/IceClFlags.def +++ b/src/IceClFlags.def
@@ -345,7 +345,11 @@ \ X(VerboseFocusOnString, std::string, dev_opt_flag, "verbose-focus", \ cl::desc("Override with -verbose=none except for specified functions"), \ - cl::init(":")) + cl::init(":")) \ + \ + X(WasmBoundsCheck, bool, dev_opt_flag, "wasm-bounds-check", \ + cl::desc("Add bounds checking code in WASM frontend"), \ + cl::init(true)) //#define X(Name, Type, ClType, ...) } // end of namespace Ice