Skip to content

[WebAssembly] Remove the wasm-disable-fix-irreducible-control-flow-pass switch - #185072

Merged
QuantumSegfault merged 1 commit into
llvm:mainfrom
QuantumSegfault:wasm-remove-disable-fix-irreducible-pass
Mar 6, 2026
Merged

QuantumSegfault merged 1 commit into
llvm:mainfrom
QuantumSegfault:wasm-remove-disable-fix-irreducible-pass

Conversation

@QuantumSegfault

Copy link
Copy Markdown
Member

This removes the wasm-disable-fix-irreducible-control-flow-pass switch.

It was originally added in #67715 as a way to avoid the potentially absurd compile times the pass used to bring. However with the successful merge of #184441, the pass itself has been fixed to avoid this issue.

Given that, it is no longer necessary nor desirable to keep this switch.

@QuantumSegfault

Copy link
Copy Markdown
Member Author

Whoops. No. Sorry. Hold on.

@QuantumSegfault
QuantumSegfault force-pushed the wasm-remove-disable-fix-irreducible-pass branch from f704c9a to 9b33179 Compare March 6, 2026 18:19
@llvmbot

llvmbot commented Mar 6, 2026

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-backend-webassembly

Author: Demetrius Kanios (QuantumSegfault)

Changes

This removes the wasm-disable-fix-irreducible-control-flow-pass switch.

It was originally added in #67715 as a way to avoid the potentially absurd compile times the pass used to bring. However with the successful merge of #184441, the pass itself has been fixed to avoid this issue.

Given that, it is no longer necessary nor desirable to keep this switch.


Full diff: https://github.com/llvm/llvm-project/pull/185072.diff

1 Files Affected:

  • (modified) llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp (+1-8)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
index ab1b24a4fd9b1..331bd0a360149 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
@@ -51,12 +51,6 @@ static cl::opt<bool> WasmDisableExplicitLocals(
              " instruction output for test purposes only."),
     cl::init(false));
 
-static cl::opt<bool> WasmDisableFixIrreducibleControlFlowPass(
-    "wasm-disable-fix-irreducible-control-flow-pass", cl::Hidden,
-    cl::desc("webassembly: disables the fix "
-             " irreducible control flow optimization pass"),
-    cl::init(false));
-
 // Exception handling & setjmp-longjmp handling related options.
 
 // Emscripten's asm.js-style exception handling
@@ -605,8 +599,7 @@ void WebAssemblyPassConfig::addPreEmitPass() {
   addPass(createWebAssemblyNullifyDebugValueLists());
 
   // Eliminate multiple-entry loops.
-  if (!WasmDisableFixIrreducibleControlFlowPass)
-    addPass(createWebAssemblyFixIrreducibleControlFlow());
+  addPass(createWebAssemblyFixIrreducibleControlFlow());
 
   // Do various transformations for exception handling.
   // Every CFG-changing optimizations should come before this.

@QuantumSegfault

Copy link
Copy Markdown
Member Author

Okay. Fixed. Ended branching from the other PR branch rather than main... -_-

It's about time I update my main

@aheejin aheejin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@QuantumSegfault
QuantumSegfault merged commit b87cf50 into llvm:main Mar 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants