[PATCH] D80047: Don't tail merge EHPads

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 16:52:20 PDT 2020


aeubanks created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aeubanks updated this revision to Diff 264384.
aeubanks added a comment.
aeubanks retitled this revision from "Don't merge EHPads" to "Don't tail merge EHPads".
aeubanks added a reviewer: rnk.

Rebase


aeubanks added a comment.

I'm not sure if this is the right thing to do, I'd like some input before continuing with tests.
I ran check-llvm and this only caused one autogenerated test to fail, which is a good sign


Likely fixes https://bugs.llvm.org/show_bug.cgi?id=45858.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80047

Files:
  llvm/lib/CodeGen/BranchFolding.cpp


Index: llvm/lib/CodeGen/BranchFolding.cpp
===================================================================
--- llvm/lib/CodeGen/BranchFolding.cpp
+++ llvm/lib/CodeGen/BranchFolding.cpp
@@ -1086,6 +1086,10 @@
       if (PBB->hasEHPadSuccessor())
         continue;
 
+      // Skip landing pads, can't tail merge these.
+      if (PBB->isEHPad())
+        continue;
+
       // After block placement, only consider predecessors that belong to the
       // same loop as IBB.  The reason is the same as above when skipping loop
       // header.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80047.264384.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200515/fea53f5f/attachment-0001.bin>


More information about the llvm-commits mailing list