[llvm] [Analysis] Add new function isDereferenceableReadOnlyLoop (PR #97292)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 06:25:35 PDT 2024
================
@@ -769,3 +769,19 @@ bool llvm::canReplacePointersIfEqual(const Value *From, const Value *To,
return isPointerAlwaysReplaceable(From, To, DL);
}
+
+bool llvm::isDereferenceableReadOnlyLoop(Loop *L, ScalarEvolution *SE,
+ DominatorTree *DT,
+ AssumptionCache *AC) {
+ for (BasicBlock *BB : L->blocks()) {
+ for (Instruction &I : *BB) {
+ LoadInst *LI = dyn_cast<LoadInst>(&I);
+ if (LI) {
----------------
david-arm wrote:
Done!
https://github.com/llvm/llvm-project/pull/97292
More information about the llvm-commits
mailing list