diff options
author | Heejin Ahn <aheejin@gmail.com> | 2024-02-22 19:17:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 19:17:15 -0800 |
commit | 6e6bf9f81756ba6655b4eea8dc45469a47f89b39 (patch) | |
tree | fcdcb08770f0408e5fa8ccbe7ed8dba5dfd68381 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | |
parent | 2e5af56b05c2d39ab2c829bf4c13190523b67ddd (diff) | |
download | llvm-6e6bf9f81756ba6655b4eea8dc45469a47f89b39.zip llvm-6e6bf9f81756ba6655b4eea8dc45469a47f89b39.tar.gz llvm-6e6bf9f81756ba6655b4eea8dc45469a47f89b39.tar.bz2 |
[WebAssembly] Disable multivalue emission temporarily (#82714)
We plan to enable multivalue in the features section soon (#80923) for
other reasons, such as the feature having been standardized for many
years and other features being developed (e.g. EH) depending on it. This
is separate from enabling Clang experimental multivalue ABI (`-Xclang
-target-abi -Xclang experimental-mv`), but it turned out we generate
some multivalue code in the backend as well if it is enabled in the
features section.
Given that our backend multivalue generation still has not been much
used nor tested, and enabling the feature in the features section can be
a separate decision from how much multialue (including none) we decide
to generate for now, I'd like to temporarily disable the actual
generation of multivalue in our backend. To do that, this adds an
internal flag `-wasm-emit-multivalue` that defaults to false. All our
existing multivalue tests can use this to test multivalue code. This
flag can be removed later when we are confident the multivalue
generation is well tested.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index 42043a7..3120b6b 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -54,6 +54,15 @@ static cl::opt<bool> WasmDisableFixIrreducibleControlFlowPass( " irreducible control flow optimization pass"), cl::init(false)); +// A temporary option to control emission of multivalue until multivalue +// implementation is stable enough. We currently don't emit multivalue by +// default even if the feature section allows it. +// TODO Stabilize multivalue and delete this option +cl::opt<bool> + WasmEmitMultiValue("wasm-emit-multivalue", cl::Hidden, + cl::desc("WebAssembly: Emit multivalue in the backend"), + cl::init(false)); + extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeWebAssemblyTarget() { // Register the target. RegisterTargetMachine<WebAssemblyTargetMachine> X( |