[llvm] [LV] Add initial legality checks for loops with unbound loads. (PR #152422)
Shih-Po Hung via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 3 01:17:31 PDT 2025
================
@@ -85,11 +85,13 @@ LLVM_ABI bool isDereferenceableAndAlignedInLoop(
AssumptionCache *AC = nullptr,
SmallVectorImpl<const SCEVPredicate *> *Predicates = nullptr);
-/// Return true if the loop \p L cannot fault on any iteration and only
-/// contains read-only memory accesses.
-LLVM_ABI bool isDereferenceableReadOnlyLoop(
- Loop *L, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC,
- SmallVectorImpl<const SCEVPredicate *> *Predicates = nullptr);
+/// Returns true if the loop contains read-only memory accesses and doesn't
+/// throw. Puts loads that may fault into \p NonDereferenceableAndAlignedLoads.
+LLVM_ABI bool
+isReadOnlyLoop(Loop *L, ScalarEvolution *SE, DominatorTree *DT,
+ AssumptionCache *AC,
+ SmallVectorImpl<LoadInst *> *NonDereferenceableAndAlignedLoads,
----------------
arcbbb wrote:
Fixed. Thanks!
https://github.com/llvm/llvm-project/pull/152422
More information about the llvm-commits
mailing list