summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2018-11-01 10:16:06 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2018-11-01 10:16:06 +0000
commitbb84407f3d97da8664e9c3e6aa6eaef6a894ca1e (patch)
tree2e9f60f51bbd889d667963530a7aafd4a3ca034e /llvm/lib
parentcd0c50e3d251fb8c063f421f0fe82a6a837e462f (diff)
downloadbcm5719-llvm-bb84407f3d97da8664e9c3e6aa6eaef6a894ca1e.tar.gz
bcm5719-llvm-bb84407f3d97da8664e9c3e6aa6eaef6a894ca1e.zip
[NFC] Specialize public API of ICFLoopSafetyInfo for insertions and removals
llvm-svn: 345822
Diffstat (limited to 'llvm/lib')
-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