[llvm] [WebAssembly] Misc. fixes in CFGStackify (PR #107182)

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 22:31:17 PDT 2024


================
@@ -845,9 +839,9 @@ static void unstackifyVRegsUsedInSplitBB(MachineBasicBlock &MBB,
 
 // Wrap the given range of instruction with try-delegate. RangeBegin and
 // RangeEnd are inclusive.
-void WebAssemblyCFGStackify::addTryDelegate(MachineInstr *RangeBegin,
-                                            MachineInstr *RangeEnd,
-                                            MachineBasicBlock *DelegateDest) {
+void WebAssemblyCFGStackify::addNestedTryDelegate(
+    MachineInstr *RangeBegin, MachineInstr *RangeEnd,
+    MachineBasicBlock *UnwindDest) {
----------------
aheejin wrote:

Here `UnwindDest` (previously `DelegateDest`) is the destination we are supposed to unwind to (but we currently don't because of an unwind mismatch, which this function is fixing).

The new to-be-added function for the new EH `addNestedTryTable` uses `UnwindDest` for this BB, so I think it'd better be consistent, even if we are using a `delegate` instruction here.

https://github.com/llvm/llvm-project/pull/107182


More information about the llvm-commits mailing list