summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/MustExecute.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MustExecute.cpp b/llvm/lib/Analysis/MustExecute.cpp
index 64ee2a7e5b0..7507aebb527 100644
--- a/llvm/lib/Analysis/MustExecute.cpp
+++ b/llvm/lib/Analysis/MustExecute.cpp
@@ -82,10 +82,16 @@ void ICFLoopSafetyInfo::computeLoopSafetyInfo(const Loop *CurLoop) {
computeBlockColors(CurLoop);
}
-void ICFLoopSafetyInfo::dropCachedInfo(const BasicBlock *BB) {
+void ICFLoopSafetyInfo::insertInstructionTo(const BasicBlock *BB) {
ICF.invalidateBlock(BB);
}
+void ICFLoopSafetyInfo::removeInstruction(const Instruction *Inst) {
+ // TODO: So far we just conservatively drop cache, but maybe we can not do it
+ // when Inst is not an ICF instruction. Follow-up on that.
+ ICF.invalidateBlock(Inst->getParent());
+}
+
void LoopSafetyInfo::computeBlockColors(const Loop *CurLoop) {
// Compute funclet colors if we might sink/hoist in a function with a funclet
// personality routine.
OpenPOWER on IntegriCloud