diff options
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/BranchProbabilityInfo.cpp | 10 | ||||
-rw-r--r-- | llvm/lib/Analysis/CFG.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/EHPersonalities.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/LoopInfo.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Analysis/MemorySSAUpdater.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp index 54a657073f0..7f544b27fe9 100644 --- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp +++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp @@ -135,7 +135,7 @@ static const uint32_t IH_NONTAKEN_WEIGHT = 1; /// Add \p BB to PostDominatedByUnreachable set if applicable. void BranchProbabilityInfo::updatePostDominatedByUnreachable(const BasicBlock *BB) { - const TerminatorInst *TI = BB->getTerminator(); + const Instruction *TI = BB->getTerminator(); if (TI->getNumSuccessors() == 0) { if (isa<UnreachableInst>(TI) || // If this block is terminated by a call to @@ -167,7 +167,7 @@ BranchProbabilityInfo::updatePostDominatedByUnreachable(const BasicBlock *BB) { void BranchProbabilityInfo::updatePostDominatedByColdCall(const BasicBlock *BB) { assert(!PostDominatedByColdCall.count(BB)); - const TerminatorInst *TI = BB->getTerminator(); + const Instruction *TI = BB->getTerminator(); if (TI->getNumSuccessors() == 0) return; @@ -202,7 +202,7 @@ BranchProbabilityInfo::updatePostDominatedByColdCall(const BasicBlock *BB) { /// Predict that a successor which leads necessarily to an /// unreachable-terminated block as extremely unlikely. bool BranchProbabilityInfo::calcUnreachableHeuristics(const BasicBlock *BB) { - const TerminatorInst *TI = BB->getTerminator(); + const Instruction *TI = BB->getTerminator(); (void) TI; assert(TI->getNumSuccessors() > 1 && "expected more than one successor!"); assert(!isa<InvokeInst>(TI) && @@ -246,7 +246,7 @@ bool BranchProbabilityInfo::calcUnreachableHeuristics(const BasicBlock *BB) { // heuristic. The probability of the edge coming to unreachable block is // set to min of metadata and unreachable heuristic. bool BranchProbabilityInfo::calcMetadataWeights(const BasicBlock *BB) { - const TerminatorInst *TI = BB->getTerminator(); + const Instruction *TI = BB->getTerminator(); assert(TI->getNumSuccessors() > 1 && "expected more than one successor!"); if (!(isa<BranchInst>(TI) || isa<SwitchInst>(TI) || isa<IndirectBrInst>(TI))) return false; @@ -348,7 +348,7 @@ bool BranchProbabilityInfo::calcMetadataWeights(const BasicBlock *BB) { /// Return true if we could compute the weights for cold edges. /// Return false, otherwise. bool BranchProbabilityInfo::calcColdCallHeuristics(const BasicBlock *BB) { - const TerminatorInst *TI = BB->getTerminator(); + const Instruction *TI = BB->getTerminator(); (void) TI; assert(TI->getNumSuccessors() > 1 && "expected more than one successor!"); assert(!isa<InvokeInst>(TI) && diff --git a/llvm/lib/Analysis/CFG.cpp b/llvm/lib/Analysis/CFG.cpp index aaea5995429..aa880a62b75 100644 --- a/llvm/lib/Analysis/CFG.cpp +++ b/llvm/lib/Analysis/CFG.cpp @@ -71,7 +71,7 @@ void llvm::FindFunctionBackedges(const Function &F, /// successor. unsigned llvm::GetSuccessorNumber(const BasicBlock *BB, const BasicBlock *Succ) { - const TerminatorInst *Term = BB->getTerminator(); + const Instruction *Term = BB->getTerminator(); #ifndef NDEBUG unsigned e = Term->getNumSuccessors(); #endif diff --git a/llvm/lib/Analysis/EHPersonalities.cpp b/llvm/lib/Analysis/EHPersonalities.cpp index 2d35a3fa911..0df73aeebbd 100644 --- a/llvm/lib/Analysis/EHPersonalities.cpp +++ b/llvm/lib/Analysis/EHPersonalities.cpp @@ -120,7 +120,7 @@ DenseMap<BasicBlock *, ColorVector> llvm::colorEHFunclets(Function &F) { << "\'.\n"); BasicBlock *SuccColor = Color; - TerminatorInst *Terminator = Visiting->getTerminator(); + Instruction *Terminator = Visiting->getTerminator(); if (auto *CatchRet = dyn_cast<CatchReturnInst>(Terminator)) { Value *ParentPad = CatchRet->getCatchSwitchParentPad(); if (isa<ConstantTokenNone>(ParentPad)) diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index fb032e0404c..1b5150a0d18 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -1831,7 +1831,7 @@ InlineResult CallAnalyzer::analyzeCall(CallSite CS) { if (!IR) return IR; - TerminatorInst *TI = BB->getTerminator(); + Instruction *TI = BB->getTerminator(); // Add in the live successors by first checking whether we have terminator // that may be simplified based on the values simplified by this call. diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index 99ff25a3fd3..4b174b66d1e 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -219,7 +219,7 @@ MDNode *Loop::getLoopID() const { SmallVector<BasicBlock *, 4> LatchesBlocks; getLoopLatches(LatchesBlocks); for (BasicBlock *BB : LatchesBlocks) { - TerminatorInst *TI = BB->getTerminator(); + Instruction *TI = BB->getTerminator(); MDNode *MD = TI->getMetadata(LLVMContext::MD_loop); if (!MD) @@ -250,7 +250,7 @@ void Loop::setLoopID(MDNode *LoopID) const { "The loop should have no single latch at this point"); BasicBlock *H = getHeader(); for (BasicBlock *BB : this->blocks()) { - TerminatorInst *TI = BB->getTerminator(); + Instruction *TI = BB->getTerminator(); for (BasicBlock *Successor : successors(TI)) { if (Successor == H) TI->setMetadata(LLVMContext::MD_loop, LoopID); diff --git a/llvm/lib/Analysis/MemorySSAUpdater.cpp b/llvm/lib/Analysis/MemorySSAUpdater.cpp index 51a5733a3ef..880dc2f2785 100644 --- a/llvm/lib/Analysis/MemorySSAUpdater.cpp +++ b/llvm/lib/Analysis/MemorySSAUpdater.cpp @@ -1104,7 +1104,7 @@ void MemorySSAUpdater::removeBlocks( const SmallPtrSetImpl<BasicBlock *> &DeadBlocks) { // First delete all uses of BB in MemoryPhis. for (BasicBlock *BB : DeadBlocks) { - TerminatorInst *TI = BB->getTerminator(); + Instruction *TI = BB->getTerminator(); assert(TI && "Basic block expected to have a terminator instruction"); for (BasicBlock *Succ : successors(TI)) if (!DeadBlocks.count(Succ)) diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 193020ed92f..4a30447f647 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -7078,7 +7078,7 @@ ScalarEvolution::computeExitLimit(const Loop *L, BasicBlock *ExitingBlock, return getCouldNotCompute(); bool IsOnlyExit = (L->getExitingBlock() != nullptr); - TerminatorInst *Term = ExitingBlock->getTerminator(); + Instruction *Term = ExitingBlock->getTerminator(); if (BranchInst *BI = dyn_cast<BranchInst>(Term)) { assert(BI->isConditional() && "If unconditional, it can't be in loop!"); bool ExitIfTrue = !L->contains(BI->getSuccessor(0)); |