Skip to content

[WebAssembly] Reapply "[WebAssembly] Incorporate SCCs into WebAssemblyFixIrreducibleControlFlow" (#181755) - #184441

Merged
QuantumSegfault merged 9 commits into
llvm:mainfrom
QuantumSegfault:wasm-fix-irreducible-cfg-fix
Mar 5, 2026
Merged

QuantumSegfault merged 9 commits into
llvm:mainfrom
QuantumSegfault:wasm-fix-irreducible-cfg-fix

Conversation

@QuantumSegfault

Copy link
Copy Markdown
Member

Reapplication of #181755.

Includes fixes to issues found after the original's merge.

@llvmbot

llvmbot commented Mar 3, 2026

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-backend-webassembly

Author: Demetrius Kanios (QuantumSegfault)

Changes

Reapplication of #181755.

Includes fixes to issues found after the original's merge.


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

1 Files Affected:

  • (modified) llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp (+158-129)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
index 07171d472dc2d..bb674686c7a39 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp
@@ -18,17 +18,17 @@
 /// The big picture: We recursively process each "region", defined as a group
 /// of blocks with a single entry and no branches back to that entry. A region
 /// may be the entire function body, or the inner part of a loop, i.e., the
-/// loop's body without branches back to the loop entry. In each region we fix
-/// up multi-entry loops by adding a new block that can dispatch to each of the
-/// loop entries, based on the value of a label "helper" variable, and we
-/// replace direct branches to the entries with assignments to the label
-/// variable and a branch to the dispatch block. Then the dispatch block is the
-/// single entry in the loop containing the previous multiple entries. After
-/// ensuring all the loops in a region are reducible, we recurse into them. The
-/// total time complexity of this pass is:
-///
-///   O(NumBlocks * NumNestedLoops * NumIrreducibleLoops +
-///     NumLoops * NumLoops)
+/// loop's body without branches back to the loop entry. In each region we
+/// identify all the strongly-connected components (SCCs). We fix up multi-entry
+/// loops (SCCs) by adding a new block that can dispatch to each of the loop
+/// entries, based on the value of a label "helper" variable, and we replace
+/// direct branches to the entries with assignments to the label variable and a
+/// branch to the dispatch block. Then the dispatch block is the single entry in
+/// the loop containing the previous multiple entries. Each time we fix some
+/// irreducibility, we recalculate the SCCs. After ensuring all the SCCs in a
+/// region are reducible, we recurse into them. The total time complexity of
+/// this pass is roughly:
+/// O((NumBlocks + NumEdges) * (NumNestedLoops + NumIrreducibleLoops))
 ///
 /// This pass is similar to what the Relooper [1] does. Both identify looping
 /// code that requires multiple entries, and resolve it in a similar way (in
@@ -55,9 +55,12 @@
 #include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
 #include "WebAssembly.h"
 #include "WebAssemblySubtarget.h"
+#include "llvm/ADT/SCCIterator.h"
+#include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/Support/Debug.h"
+#include <limits>
 using namespace llvm;
 
 #define DEBUG_TYPE "wasm-fix-irreducible-control-flow"
@@ -78,9 +81,15 @@ static BlockVector getSortedEntries(const BlockSet &Entries) {
   return SortedEntries;
 }
 
-// Calculates reachability in a region. Ignores branches to blocks outside of
-// the region, and ignores branches to the region entry (for the case where
-// the region is the inner part of a loop).
+struct ReachabilityNode {
+  MachineBasicBlock *MBB;
+  SmallVector<ReachabilityNode *, 4> Succs;
+  unsigned SCCId = std::numeric_limits<unsigned>::max();
+};
+
+// Analyzes the SCC (strongly-connected component) structure in a region.
+// Ignores branches to blocks outside of the region, and ignores branches to the
+// region entry (for the case where the region is the inner part of a loop).
 class ReachabilityGraph {
 public:
   ReachabilityGraph(MachineBasicBlock *Entry, const BlockSet &Blocks)
@@ -98,137 +107,142 @@ class ReachabilityGraph {
     calculate();
   }
 
-  bool canReach(MachineBasicBlock *From, MachineBasicBlock *To) const {
-    assert(inRegion(From) && inRegion(To));
-    auto I = Reachable.find(From);
-    if (I == Reachable.end())
-      return false;
-    return I->second.count(To);
-  }
-
-  // "Loopers" are blocks that are in a loop. We detect these by finding blocks
-  // that can reach themselves.
-  const BlockSet &getLoopers() const { return Loopers; }
-
   // Get all blocks that are loop entries.
   const BlockSet &getLoopEntries() const { return LoopEntries; }
+  const BlockSet &getLoopEntriesForSCC(unsigned SCCId) const {
+    return LoopEntriesBySCC[SCCId];
+  }
 
-  // Get all blocks that enter a particular loop from outside.
-  const BlockSet &getLoopEnterers(MachineBasicBlock *LoopEntry) const {
-    assert(inRegion(LoopEntry));
-    auto I = LoopEnterers.find(LoopEntry);
-    assert(I != LoopEnterers.end());
-    return I->second;
+  unsigned getSCCId(MachineBasicBlock *MBB) const {
+    return getNode(MBB)->SCCId;
   }
 
+  friend struct GraphTraits<ReachabilityGraph *>;
+
 private:
   MachineBasicBlock *Entry;
   const BlockSet &Blocks;
 
-  BlockSet Loopers, LoopEntries;
-  DenseMap<MachineBasicBlock *, BlockSet> LoopEnterers;
+  BlockSet LoopEntries;
+  SmallVector<BlockSet, 0> LoopEntriesBySCC;
 
   bool inRegion(MachineBasicBlock *MBB) const { return Blocks.count(MBB); }
 
-  // Maps a block to all the other blocks it can reach.
-  DenseMap<MachineBasicBlock *, BlockSet> Reachable;
+  SmallVector<ReachabilityNode, 0> Nodes;
+  DenseMap<MachineBasicBlock *, ReachabilityNode *> MBBToNodeMap;
 
-  void calculate() {
-    // Reachability computation work list. Contains pairs of recent additions
-    // (A, B) where we just added a link A => B.
-    using BlockPair = std::pair<MachineBasicBlock *, MachineBasicBlock *>;
-    SmallVector<BlockPair, 4> WorkList;
+  ReachabilityNode *getNode(MachineBasicBlock *MBB) const {
+    dbgs() << MBB->getName() << "\n";
+    return MBBToNodeMap.at(MBB);
+  }
 
-    // Add all relevant direct branches.
-    for (auto *MBB : Blocks) {
-      for (auto *Succ : MBB->successors()) {
-        if (Succ != Entry && inRegion(Succ)) {
-          Reachable[MBB].insert(Succ);
-          WorkList.emplace_back(MBB, Succ);
-        }
-      }
-    }
+  void calculate();
+};
+} // end anonymous namespace
 
-    while (!WorkList.empty()) {
-      MachineBasicBlock *MBB, *Succ;
-      std::tie(MBB, Succ) = WorkList.pop_back_val();
-      assert(inRegion(MBB) && Succ != Entry && inRegion(Succ));
-      if (MBB != Entry) {
-        // We recently added MBB => Succ, and that means we may have enabled
-        // Pred => MBB => Succ.
-        for (auto *Pred : MBB->predecessors()) {
-          if (Reachable[Pred].insert(Succ).second) {
-            WorkList.emplace_back(Pred, Succ);
-          }
-        }
-      }
-    }
+namespace llvm {
+template <> struct GraphTraits<ReachabilityGraph *> {
+  using NodeRef = ReachabilityNode *;
+  using ChildIteratorType = SmallVectorImpl<NodeRef>::iterator;
 
-    // Blocks that can return to themselves are in a loop.
-    for (auto *MBB : Blocks) {
-      if (canReach(MBB, MBB)) {
-        Loopers.insert(MBB);
-      }
-    }
-    assert(!Loopers.count(Entry));
-
-    // Find the loop entries - loopers reachable from blocks not in that loop -
-    // and those outside blocks that reach them, the "loop enterers".
-    for (auto *Looper : Loopers) {
-      for (auto *Pred : Looper->predecessors()) {
-        // Pred can reach Looper. If Looper can reach Pred, it is in the loop;
-        // otherwise, it is a block that enters into the loop.
-        if (!canReach(Looper, Pred)) {
-          LoopEntries.insert(Looper);
-          LoopEnterers[Looper].insert(Pred);
-        }
-      }
-    }
+  static NodeRef getEntryNode(ReachabilityGraph *G) {
+    return G->getNode(G->Entry);
+  }
+
+  static inline ChildIteratorType child_begin(NodeRef N) {
+    return N->Succs.begin();
+  }
+
+  static inline ChildIteratorType child_end(NodeRef N) {
+    return N->Succs.end();
   }
 };
+} // end namespace llvm
 
-// Finds the blocks in a single-entry loop, given the loop entry and the
-// list of blocks that enter the loop.
-class LoopBlocks {
-public:
-  LoopBlocks(MachineBasicBlock *Entry, const BlockSet &Enterers)
-      : Entry(Entry), Enterers(Enterers) {
-    calculate();
+namespace {
+
+void ReachabilityGraph::calculate() {
+  auto NumBlocks = Blocks.size();
+  Nodes.assign(NumBlocks, {});
+
+  MBBToNodeMap.clear();
+  MBBToNodeMap.reserve(NumBlocks);
+
+  // Initialize mappings.
+  unsigned MBBIdx = 0;
+  for (auto *MBB : Blocks) {
+    auto &Node = Nodes[MBBIdx++];
+
+    Node.MBB = MBB;
+    MBBToNodeMap[MBB] = &Node;
   }
 
-  BlockSet &getBlocks() { return Blocks; }
+  // Add all relevant direct branches.
+  MBBIdx = 0;
+  for (auto *MBB : Blocks) {
+    auto &Node = Nodes[MBBIdx++];
 
-private:
-  MachineBasicBlock *Entry;
-  const BlockSet &Enterers;
+    for (auto *Succ : MBB->successors()) {
+      if (Succ != Entry && inRegion(Succ)) {
+        Node.Succs.push_back(getNode(Succ));
+      }
+    }
+  }
 
-  BlockSet Blocks;
+  unsigned CurrSCCIdx = 0;
+  for (auto &SCC : make_range(scc_begin(this), scc_end(this))) {
+    LoopEntriesBySCC.push_back({});
+    auto &SCCLoopEntries = LoopEntriesBySCC.back();
 
-  void calculate() {
-    // Going backwards from the loop entry, if we ignore the blocks entering
-    // from outside, we will traverse all the blocks in the loop.
-    BlockVector WorkList;
-    BlockSet AddedToWorkList;
-    Blocks.insert(Entry);
-    for (auto *Pred : Entry->predecessors()) {
-      if (!Enterers.count(Pred)) {
-        WorkList.push_back(Pred);
-        AddedToWorkList.insert(Pred);
+    for (auto *Node : SCC) {
+      // Make sure nodes are only ever assigned one SCC
+      assert(Node->SCCId == std::numeric_limits<unsigned>::max());
+
+      Node->SCCId = CurrSCCIdx;
+    }
+
+    bool SelfLoop = false;
+    if (SCC.size() == 1) {
+      auto &Node = SCC[0];
+
+      for (auto *Succ : Node->Succs) {
+        if (Succ == Node) {
+          SelfLoop = true;
+          break;
+        }
       }
     }
 
-    while (!WorkList.empty()) {
-      auto *MBB = WorkList.pop_back_val();
-      assert(!Enterers.count(MBB));
-      if (Blocks.insert(MBB).second) {
-        for (auto *Pred : MBB->predecessors()) {
-          if (AddedToWorkList.insert(Pred).second)
-            WorkList.push_back(Pred);
+    // Blocks outside any (multi-block) loop will be isolated in their own
+    // single-element SCC. Thus blocks that are in a loop are those in
+    // multi-element SCCs or are self-looping.
+    if (SCC.size() > 1 || SelfLoop) {
+      // Find the loop entries - loop body blocks with predecessors outside
+      // their SCC
+      for (auto *Node : SCC) {
+        if (Node->MBB == Entry)
+          continue;
+
+        for (auto *Pred : Node->MBB->predecessors()) {
+          // This test is accurate despite not having assigned all nodes an SCC
+          // yet. We only care if a node has been assigned into this SCC or not.
+          if (getSCCId(Pred) != CurrSCCIdx) {
+            LoopEntries.insert(Node->MBB);
+            SCCLoopEntries.insert(Node->MBB);
+          }
         }
       }
     }
+    ++CurrSCCIdx;
   }
-};
+
+#ifndef NDEBUG
+  // Make sure all nodes have been processed
+  for (auto &Node : Nodes) {
+    assert(Node.SCCId != std::numeric_limits<unsigned>::max());
+  }
+#endif
+}
 
 class WebAssemblyFixIrreducibleControlFlow final : public MachineFunctionPass {
   StringRef getPassName() const override {
@@ -240,7 +254,7 @@ class WebAssemblyFixIrreducibleControlFlow final : public MachineFunctionPass {
   bool processRegion(MachineBasicBlock *Entry, BlockSet &Blocks,
                      MachineFunction &MF);
 
-  void makeSingleEntryLoop(BlockSet &Entries, BlockSet &Blocks,
+  void makeSingleEntryLoop(const BlockSet &Entries, BlockSet &Blocks,
                            MachineFunction &MF, const ReachabilityGraph &Graph);
 
 public:
@@ -261,7 +275,7 @@ bool WebAssemblyFixIrreducibleControlFlow::processRegion(
     for (auto *LoopEntry : getSortedEntries(Graph.getLoopEntries())) {
       // Find mutual entries - all entries which can reach this one, and
       // are reached by it (that always includes LoopEntry itself). All mutual
-      // entries must be in the same loop, so if we have more than one, then we
+      // entries must be in the same SCC, so if we have more than one, then we
       // have irreducible control flow.
       //
       // (Note that we need to sort the entries here, as otherwise the order can
@@ -284,15 +298,8 @@ bool WebAssemblyFixIrreducibleControlFlow::processRegion(
       // a group of blocks all of whom can reach each other. (We'll see the
       // irreducibility after removing branches to the top of that enclosing
       // loop.)
-      BlockSet MutualLoopEntries;
-      MutualLoopEntries.insert(LoopEntry);
-      for (auto *OtherLoopEntry : Graph.getLoopEntries()) {
-        if (OtherLoopEntry != LoopEntry &&
-            Graph.canReach(LoopEntry, OtherLoopEntry) &&
-            Graph.canReach(OtherLoopEntry, LoopEntry)) {
-          MutualLoopEntries.insert(OtherLoopEntry);
-        }
-      }
+      auto &MutualLoopEntries =
+          Graph.getLoopEntriesForSCC(Graph.getSCCId(LoopEntry));
 
       if (MutualLoopEntries.size() > 1) {
         makeSingleEntryLoop(MutualLoopEntries, Blocks, MF, Graph);
@@ -301,6 +308,7 @@ bool WebAssemblyFixIrreducibleControlFlow::processRegion(
         break;
       }
     }
+
     // Only go on to actually process the inner loops when we are done
     // removing irreducible control flow and changing the graph. Modifying
     // the graph as we go is possible, and that might let us avoid looking at
@@ -312,14 +320,22 @@ bool WebAssemblyFixIrreducibleControlFlow::processRegion(
     }
 
     for (auto *LoopEntry : Graph.getLoopEntries()) {
-      LoopBlocks InnerBlocks(LoopEntry, Graph.getLoopEnterers(LoopEntry));
+      BlockSet InnerBlocks;
+
+      auto EntrySCCId = Graph.getSCCId(LoopEntry);
+      for (auto *Block : Blocks) {
+        if (EntrySCCId == Graph.getSCCId(Block)) {
+          InnerBlocks.insert(Block);
+        }
+      }
+
       // Each of these calls to processRegion may change the graph, but are
       // guaranteed not to interfere with each other. The only changes we make
       // to the graph are to add blocks on the way to a loop entry. As the
       // loops are disjoint, that means we may only alter branches that exit
       // another loop, which are ignored when recursing into that other loop
       // anyhow.
-      if (processRegion(LoopEntry, InnerBlocks.getBlocks(), MF)) {
+      if (processRegion(LoopEntry, InnerBlocks, MF)) {
         Changed = true;
       }
     }
@@ -335,7 +351,7 @@ bool WebAssemblyFixIrreducibleControlFlow::processRegion(
 // ReachabilityGraph; this will be updated in the caller of this function as
 // needed.
 void WebAssemblyFixIrreducibleControlFlow::makeSingleEntryLoop(
-    BlockSet &Entries, BlockSet &Blocks, MachineFunction &MF,
+    const BlockSet &Entries, BlockSet &Blocks, MachineFunction &MF,
     const ReachabilityGraph &Graph) {
   assert(Entries.size() >= 2);
 
@@ -401,10 +417,12 @@ void WebAssemblyFixIrreducibleControlFlow::makeSingleEntryLoop(
   // This set stores predecessors within this loop.
   DenseSet<MachineBasicBlock *> InLoop;
   for (auto *Pred : AllPreds) {
+    auto PredSCCId = Graph.getSCCId(Pred);
+
     for (auto *Entry : Pred->successors()) {
       if (!Entries.count(Entry))
         continue;
-      if (Graph.canReach(Entry, Pred)) {
+      if (Graph.getSCCId(Entry) == PredSCCId) {
         InLoop.insert(Pred);
         break;
       }
@@ -539,6 +557,17 @@ bool WebAssemblyFixIrreducibleControlFlow::runOnMachineFunction(
   // Start the recursive process on the entire function body.
   BlockSet AllBlocks;
   for (auto &MBB : MF) {
+    // Prevent isolated orphan blocks from being processed.
+    //
+    // Even at O0, translation from IR to SelectionDAG or gMIR may optimize away
+    // branches to blocks containing only `unreachable`. Doing so without DCE
+    // orphans the block, which trips our assertion that all MBBs get assigned
+    // an SCC.
+    //
+    // Ignoring these blocks is safe, as they couldn't possibly be irreducible.
+    if (&MBB != &*MF.begin() && MBB.pred_empty() && MBB.succ_empty())
+      continue;
+
     AllBlocks.insert(&MBB);
   }
 

@QuantumSegfault
QuantumSegfault force-pushed the wasm-fix-irreducible-cfg-fix branch from 52dfe03 to 92bb3bd Compare March 3, 2026 21:33
@QuantumSegfault

Copy link
Copy Markdown
Member Author

The first four commits are from the original PR.

I ran it against the previously broken test, as well as the rest of the Emscripten core0 and other test suites. No relevant failures.

@github-actions

github-actions Bot commented Mar 3, 2026 •

Copy link
Copy Markdown

🐧 Linux x64 Test Results

  • 191594 tests passed
  • 4988 tests skipped

✅ The build succeeded and all tests passed.

@QuantumSegfault

Copy link
Copy Markdown
Member Author

cc @kripken

@dschuff dschuff 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.

I also ran it against core3 (and s and others to cover the DAG ISel codepath).

Comment on lines 559 to 568

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.

What if there are a cluster of unreachable blocks? They will have non-empty preds and succs.

Also, would it be possible that those unreachable blocks to form an irreducible CFG? Then CFGStackify will try to linearize it and fail.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Then the assertions we have in place will get tripped (as they won't be assigned an SCC because they aren't connected to the function entry), and we can deal with that when it comes.

It is generally expected that DCE clean up any MBBs not accessible from the entry before we get here.

@aheejin aheejin Mar 4, 2026 •

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.

Then the assertions we have in place will get tripped (as they won't be assigned an SCC because they aren't connected to the function entry), and we can deal with that when it comes.

If we know there can be a single unreachable BB, why not two of them linked together? I think we should at least try to deal with all imaginable valid inputs, not just waiting for the errors to come up.

It is generally expected that DCE clean up any MBBs not accessible from the entry before we get here.

That's what I thought too. Does this happen only with llc -O0?

By the way, why did the previous code (without SCCIterator) handle this code and #181755 doesn't?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this is a VERY specific edge case where the translation from IR to DAG (or gMIR) orphans a block. It detects that the default branch target is just a dead-end unreachable IR instruction and optimizes the target out during the translation step. But since it happens during translation, rather than earlier in a IR level optimization pass that would occur at O2 (and likely O1; so we only run into this at O0), the target block is never cleaned up by DCE. It floats around orphaned, even though it can't be accessed anymore. It can't have any successors, as it must end in unreachable, so two chained BBs is not a concern here.

I don't know of any other case where we'd orphan a whole MBB chain without cleaning it up (though that's not saying much...).

But really, if there's any other significant cases of unreachable MBB, we should probably incorporate a full unreachable (machine ) basic block eliminator into the pipeline sometime before (or even during) this pass, even at O0. No sense in fixing, reordering, structuring, and emitting dead branches of the CFG.


The previous code did things in such a way that even blocks not accessible from the Entry of a region (which is only ever possible for the initial call to processRegion spanning the whole function) would still map out the full network of for EACH block included in the "region", which other blocks could be transiently reached. Even isolated bubbles would be checked correctly, albeit inefficiently. The assumption made by our use of SCCs is that every relevant block is accessible from the entry of the region (otherwise, why is it even in the region???). I included an assertion to verify my assumption, which got tripped here.

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.

I get that this is a special edge case generated during iSel and it is very unlikely that a function with a cluster of unreachable BBs enters this pass, but I think the rule of compiler pass is, to the extent possible, to handle all possible valid inputs, however unlikely they are. Maybe running UnreachableMachineBlockElim before this pass is the simplest solution. But I wonder what others think.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was looking for that! I saw the one operating on normal IR basic blocks, but thought we'd have to roll our own for MBB.

In that case I can just have that run right before this one (I doesn't seem like other passes have had a problem with unreachable blocks...and that we can guard ourselves against all possible passes that run before us).

But yeah, let's see what the others think.

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.

+1 I also looked for an equivalent of SimplifyCFG for machine functions and didn't find it :)
I think it makes sense to run UnreachableBlockElim before this pass, I agree that most components should try to handle any valid inputs.

@aheejin

aheejin commented Mar 4, 2026 •

Copy link
Copy Markdown
Member

Whichever way we end up resolving this, can you add your reduced testcase to tests?

target triple = "wasm32-unknown-unknown"

define void @test() {
entry:
 switch i32 poison, label %b [
    i32 0, label %a
  ]

a:
  ret void

b:
    unreachable
}

oh, and with comments why this case causes the problem

@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.

Thank you!

@QuantumSegfault

Copy link
Copy Markdown
Member Author

@dschuff

You still "Approve"? I rechecked against Emscripten core0, core3, cores, and other (and CI has handled LLVM/Clang, now including our reproducer), and it's all good.

@dschuff

dschuff commented Mar 5, 2026

Copy link
Copy Markdown
Member

Yes, thanks!

@QuantumSegfault

Copy link
Copy Markdown
Member Author

Well, let's try this again...

@QuantumSegfault
QuantumSegfault merged commit 0a76568 into llvm:main Mar 5, 2026
8 checks passed
QuantumSegfault added a commit that referenced this pull request Mar 6, 2026
…ass` switch (#185072)

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.
@aheejin

aheejin commented Apr 8, 2026

Copy link
Copy Markdown
Member

/cherry-pick 0a76568

@llvmbot

llvmbot commented Apr 8, 2026

Copy link
Copy Markdown
Member

/cherry-pick 0a76568

Error: Command failed due to missing milestone.

@aheejin aheejin added this to the LLVM 22.x Release milestone Apr 8, 2026
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in LLVM Release Status Apr 8, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in LLVM Release Status Apr 8, 2026
Hyp3rSon1X pushed a commit to Hyp3rSon1X/llvm-project that referenced this pull request Nov 23, 2026
…yFixIrreducibleControlFlow" (llvm#181755) (llvm#184441)

Re-application of llvm#181755.

Includes fixes to issues found after the original's merge.

(cherry picked from commit 0a76568)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants