[PATCH] D128823: [SCCP] Make it possible to remove predicate info for a given instruction.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 07:32:13 PDT 2022
labrinea created this revision.
labrinea added a reviewer: llvm-commits.
Herald added a subscriber: hiraditya.
Herald added a project: All.
labrinea requested review of this revision.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128823
Files:
llvm/include/llvm/Transforms/Utils/PredicateInfo.h
llvm/lib/Transforms/Utils/SCCPSolver.cpp
Index: llvm/lib/Transforms/Utils/SCCPSolver.cpp
===================================================================
--- llvm/lib/Transforms/Utils/SCCPSolver.cpp
+++ llvm/lib/Transforms/Utils/SCCPSolver.cpp
@@ -341,6 +341,13 @@
return A->second.PredInfo->getPredicateInfoFor(I);
}
+ bool removePredicateInfoFor(Instruction *I) {
+ auto A = AnalysisResults.find(I->getParent()->getParent());
+ if (A == AnalysisResults.end())
+ return false;
+ return A->second.PredInfo->removePredicateInfoFor(I);
+ }
+
DomTreeUpdater getDTU(Function &F) {
auto A = AnalysisResults.find(&F);
assert(A != AnalysisResults.end() && "Need analysis results for function.");
Index: llvm/include/llvm/Transforms/Utils/PredicateInfo.h
===================================================================
--- llvm/include/llvm/Transforms/Utils/PredicateInfo.h
+++ llvm/include/llvm/Transforms/Utils/PredicateInfo.h
@@ -189,6 +189,8 @@
return PredicateMap.lookup(V);
}
+ bool removePredicateInfoFor(const Value *V) { return PredicateMap.erase(V); }
+
protected:
// Used by PredicateInfo annotater, dumpers, and wrapper pass.
friend class PredicateInfoAnnotatedWriter;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128823.441003.patch
Type: text/x-patch
Size: 1196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220629/5d97f0e3/attachment.bin>
More information about the llvm-commits
mailing list