[PATCH] D54571: [WebAssembly] Split BBs after throw instructions
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 15 13:52:23 PST 2018
aheejin 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());
----------------
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)
Repository:
rL LLVM
https://reviews.llvm.org/D54571
More information about the llvm-commits
mailing list