[llvm] [LoopVectorize] Add support for vectorisation of more early exit loops (PR #88385)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 02:56:34 PDT 2024
================
@@ -653,7 +659,24 @@ class LoopAccessInfo {
bool isInvariant(Value *V) const;
unsigned getNumStores() const { return NumStores; }
- unsigned getNumLoads() const { return NumLoads;}
+ unsigned getNumLoads() const { return NumLoads; }
+ unsigned getNumCalls() const { return NumCalls; }
+
+ /// Returns all exiting blocks with a countable exit, i.e. the
+ /// exit-not-taken count is known exactly at compile time.
+ const SmallVector<BasicBlock *, 4> &getCountableExitingBlocks() const {
+ return CountableExitingBlocks;
+ }
+
+ /// Returns all the exiting blocks with an uncountable exit.
+ const SmallVector<BasicBlock *, 4> &getUncountableExitingBlocks() const {
----------------
fhahn wrote:
IMO LAA is already quite complicated and should focus on checking dependences and collecting infos for runtime checks and it would be better to avoid introducing complexity which may be used by other passes in the unknown future. Keeping LAA focused hopefully makes it easier to extend its capabilities w.r.t. to generating runtime checks and dependence analysis in the future
As the functionality is independent of LAA, it could live in a separate utility if decoupling of LV is desired.
https://github.com/llvm/llvm-project/pull/88385
More information about the llvm-commits
mailing list