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

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


================
@@ -491,20 +491,16 @@ void WebAssemblyCFGStackify::placeTryMarker(MachineBasicBlock &MBB) {
   WebAssemblyException *WE = WEI.getExceptionFor(&MBB);
   assert(WE);
   MachineBasicBlock *Bottom = SRI.getBottom(WE);
-
   auto Iter = std::next(Bottom->getIterator());
   if (Iter == MF.end()) {
     getAppendixBlock(MF);
     Iter = std::next(Bottom->getIterator());
   }
   MachineBasicBlock *Cont = &*Iter;
 
-  assert(Cont != &MF.front());
-  MachineBasicBlock *LayoutPred = Cont->getPrevNode();
----------------
aheejin wrote:

`Bottom` and `LayoutPred` here are the same thing.
(Also the `assert` is too obvious and I don't think we need it. We computed `Iter` by doing `std::next` on some BB  just above.)

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


More information about the llvm-commits mailing list