At optimization level -O2 and above, add SeparateConstOffsetFromGEP, EarlyCSE, InstCombine and LICM to the addIRPasses phase.
These passes will also enable D139415.
Paths
| Differential D141926
[WebAssembly] Add passes for GEP lowering Needs ReviewPublic Authored by samparker on Jan 17 2023, 6:00 AM.
Details
Diff Detail
Unit TestsFailed Event Timeline
Comment Actions
Using wasi-sdk-19, the total code size of my suite is 7985 KB. With this patch it's reduced slightly to 7982 KB. Comment Actions
I don't know... I just use wasi-sdk and I assumed it just uses clang, llvm and lld. Though, after reporting the (small) code size changes, the reported performance numbers (large) didn't make sense. I'm still investigating what's going on. Comment Actions The clang driver will automatically call wasm-opt if it finds it in your PATH, so it's worth checking whether wasm-opt is being run or not.
Comment Actions Sorry for the delay in replying. I found it impossible to reproduce my previously quoted numbers. I'm juggling an evolving benchmark suite, while modifying wasi-sdk and NodeJS, so I'm guessing I got something out-of-sync! Below are my revised numbers, with the varying configuration options for completeness. I'm running on an Ampere Altra, with a modified version of NodeJS which uses trap handlers for OOB checks (the patch is currently in review for V8), and I'm only using the TurboFan compiler to reduce noise. wasm-opt is not on my PATH. The main takeaways are:
Revision Contents
Diff 489789 llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
llvm/test/CodeGen/WebAssembly/address-offsets.ll
llvm/test/CodeGen/WebAssembly/cfg-stackify.ll
llvm/test/CodeGen/WebAssembly/debugtrap.ll
llvm/test/CodeGen/WebAssembly/fast-isel-br-i1.ll
llvm/test/CodeGen/WebAssembly/fpclamptosat.ll
llvm/test/CodeGen/WebAssembly/fpclamptosat_vec.ll
llvm/test/CodeGen/WebAssembly/function-addr-offset.ll
llvm/test/CodeGen/WebAssembly/implicit-def.ll
llvm/test/CodeGen/WebAssembly/ir-locals.ll
llvm/test/CodeGen/WebAssembly/libcalls.ll
llvm/test/CodeGen/WebAssembly/load-store-pic.ll
llvm/test/CodeGen/WebAssembly/pr59626.ll
llvm/test/CodeGen/WebAssembly/reg-stackify.ll
llvm/test/CodeGen/WebAssembly/simd-comparisons.ll
llvm/test/CodeGen/WebAssembly/simd.ll
llvm/test/CodeGen/WebAssembly/userstack.ll
llvm/test/MC/WebAssembly/stack-ptr-mclower.ll
llvm/test/MC/WebAssembly/stack-ptr.ll
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll.generated.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/wasm_generated_funcs.ll.nogenerated.expected
|
have you ever test with createSeparateConstOffsetFromGEPPass(true)