[PATCH] D54571: [WebAssembly] Split BBs after throw instructions

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 15:14:47 PST 2018


dschuff added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp:90
 template <typename Container>
-static void EraseBBsAndChildren(const Container &MBBs) {
+static void eraseBBsAndChildren(const Container &MBBs) {
   SmallVector<MachineBasicBlock *, 8> WL(MBBs.begin(), MBBs.end());
----------------
aheejin wrote:
> dschuff wrote:
> > aheejin wrote:
> > > This now does not delete children with remaining predecessors because the purpose of this function was delete dead children. Predecessors of blocks in `MBBs` are removed before calling this function.
> > The name and description for this function is now the same as eraseBBsAndChildren above but the implementation is different. The code looks like it does the same thing, any reason it can't be identical?
> One is for LLVM IR (`BasicBlock` and `Instruction`) and the other is for the backend IR (`MachineFunction` and `MachineInstr`). And for the LLVM IR version I used `DeleteDeadBlock` utility method. (I don't think there's a similar utility method for the backend IR)
oh haha i totally missed that. Guess that means we have good abstractions or something ¯\_(ツ)_/¯


Repository:
  rL LLVM

https://reviews.llvm.org/D54571





More information about the llvm-commits mailing list