[PATCH] D52345: [PowerPC] optimize conditional branch on CRSET/CRUNSET

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 24 14:23:08 PDT 2018


nemanjai added inline comments.


================
Comment at: lib/Target/PowerPC/PPCPreEmitPeephole.cpp:109
+        auto RemoveMBB = [](MachineBasicBlock *MBB) {
+          for (auto Succ: MBB->successors())
+            MBB->removeSuccessor(Succ);
----------------
Any one of these successors now might have become unreachable, right? Should this just be a static recursive function?
Seems that it would be nice if we could just run a pass that eliminates unreachable blocks after this pass.


https://reviews.llvm.org/D52345





More information about the llvm-commits mailing list