[llvm-branch-commits] [llvm-branch] r369085 - Merging r368873:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 16 00:18:49 PDT 2019


Author: hans
Date: Fri Aug 16 00:18:49 2019
New Revision: 369085

URL: http://llvm.org/viewvc/llvm-project?rev=369085&view=rev
Log:
Merging r368873:
------------------------------------------------------------------------
r368873 | void | 2019-08-14 18:44:07 +0200 (Wed, 14 Aug 2019) | 15 lines

Ignore indirect branches from callbr.

Summary:
We can't speculate around indirect branches: indirectbr and invoke. The
callbr instruction needs to be included here.

Reviewers: nickdesaulniers, manojgupta, chandlerc

Reviewed By: chandlerc

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66200
------------------------------------------------------------------------

Added:
    llvm/branches/release_90/test/Transforms/SpeculateAroundPHIs/pr42991.ll
      - copied unchanged from r368873, llvm/trunk/test/Transforms/SpeculateAroundPHIs/pr42991.ll
Modified:
    llvm/branches/release_90/   (props changed)
    llvm/branches/release_90/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp

Propchange: llvm/branches/release_90/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 16 00:18:49 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366481,366487,366527,366570,366660,366868,366925,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367417,367662,367750,367753,367846-367847,367898,367941,368004,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572
+/llvm/trunk:155241,366431,366481,366487,366527,366570,366660,366868,366925,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367417,367662,367750,367753,367846-367847,367898,367941,368004,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873

Modified: llvm/branches/release_90/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp?rev=369085&r1=369084&r2=369085&view=diff
==============================================================================
--- llvm/branches/release_90/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp (original)
+++ llvm/branches/release_90/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp Fri Aug 16 00:18:49 2019
@@ -777,8 +777,10 @@ static bool tryToSpeculatePHIs(SmallVect
     // speculation if the predecessor is an invoke. This doesn't seem
     // fundamental and we should probably be splitting critical edges
     // differently.
-    if (isa<IndirectBrInst>(PredBB->getTerminator()) ||
-        isa<InvokeInst>(PredBB->getTerminator())) {
+    const auto *TermInst = PredBB->getTerminator();
+    if (isa<IndirectBrInst>(TermInst) ||
+        isa<InvokeInst>(TermInst) ||
+        isa<CallBrInst>(TermInst)) {
       LLVM_DEBUG(dbgs() << "  Invalid: predecessor terminator: "
                         << PredBB->getName() << "\n");
       return false;




More information about the llvm-branch-commits mailing list