diff options
author | Arthur Eubanks <aeubanks@google.com> | 2021-10-08 10:50:06 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2021-10-08 10:53:23 -0700 |
commit | 9405217999efd50c91261aeb9aeae13e4f6d28f3 (patch) | |
tree | 306c10c565ca0dea9fad2d22d4d205b21afac33d /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 7d7b139042e8b52ff327314c3c3a1b74d34b264b (diff) | |
download | llvm-9405217999efd50c91261aeb9aeae13e4f6d28f3.zip llvm-9405217999efd50c91261aeb9aeae13e4f6d28f3.tar.gz llvm-9405217999efd50c91261aeb9aeae13e4f6d28f3.tar.bz2 |
Revert "Recommit "[LoopPeel] Peel loops with deoptimizing exits""
This reverts commit d68b59f3ebb253ee7119a25a71c51cf19b73e030.
This is causing crashes, see D110922 for details.
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index de6c2af..1a07697 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -39,7 +39,6 @@ #include "llvm/IR/Value.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Support/Casting.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Transforms/Utils/Local.h" @@ -53,11 +52,6 @@ using namespace llvm; #define DEBUG_TYPE "basicblock-utils" -static cl::opt<unsigned> MaxDeoptimizingCheckDepth( - "max-deopt-check-depth", cl::init(8), cl::Hidden, - cl::desc("Set the maximum path length when checking whether a basic block " - "is deoptimizing")); - void llvm::DetatchDeadBlocks( ArrayRef<BasicBlock *> BBs, SmallVectorImpl<DominatorTree::UpdateType> *Updates, @@ -491,20 +485,6 @@ void llvm::ReplaceInstWithInst(BasicBlock::InstListType &BIL, BI = New; } -bool llvm::IsBlockFollowedByDeoptOrUnreachable(const BasicBlock *BB) { - // Remember visited blocks to avoid infinite loop - SmallPtrSet<const BasicBlock *, 8> VisitedBlocks; - unsigned Depth = 0; - while (BB && Depth++ < MaxDeoptimizingCheckDepth && - VisitedBlocks.insert(BB).second) { - if (BB->getTerminatingDeoptimizeCall() || - isa<UnreachableInst>(BB->getTerminator())) - return true; - BB = BB->getSingleSuccessor(); - } - return false; -} - void llvm::ReplaceInstWithInst(Instruction *From, Instruction *To) { BasicBlock::iterator BI(From); ReplaceInstWithInst(From->getParent()->getInstList(), BI, To); |