[PATCH] D57358: [BranchFolding] Remove what appears to be dead code

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 22:21:42 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL353375: [BranchFolding] Remove dead code for handling EHPad blocks (authored by ctopper, committed by ).
Herald added a project: LLVM.

Changed prior to commit:
  https://reviews.llvm.org/D57358?vs=183957&id=185706#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57358/new/

https://reviews.llvm.org/D57358

Files:
  llvm/trunk/lib/CodeGen/BranchFolding.cpp


Index: llvm/trunk/lib/CodeGen/BranchFolding.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/BranchFolding.cpp
+++ llvm/trunk/lib/CodeGen/BranchFolding.cpp
@@ -1182,29 +1182,6 @@
           }
         }
 
-        // Failing case: the only way IBB can be reached from PBB is via
-        // exception handling.  Happens for landing pads.  Would be nice to have
-        // a bit in the edge so we didn't have to do all this.
-        if (IBB->isEHPad()) {
-          MachineFunction::iterator IP = ++PBB->getIterator();
-          MachineBasicBlock *PredNextBB = nullptr;
-          if (IP != MF.end())
-            PredNextBB = &*IP;
-          if (!TBB) {
-            if (IBB != PredNextBB)      // fallthrough
-              continue;
-          } else if (FBB) {
-            if (TBB != IBB && FBB != IBB)   // cbr then ubr
-              continue;
-          } else if (Cond.empty()) {
-            if (TBB != IBB)               // ubr
-              continue;
-          } else {
-            if (TBB != IBB && IBB != PredNextBB)  // cbr
-              continue;
-          }
-        }
-
         // Remove the unconditional branch at the end, if any.
         if (TBB && (Cond.empty() || FBB)) {
           DebugLoc dl = PBB->findBranchDebugLoc();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57358.185706.patch
Type: text/x-patch
Size: 1307 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190207/07f5d744/attachment.bin>


More information about the llvm-commits mailing list