1 //===------ EVLIndVarSimplify.h - Optimize vectorized loops w/ EVL IV------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This pass optimizes a vectorized loop with canonical IV to using EVL-based 10 // IV if it was tail-folded by predicated EVL. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_TRANSFORMS_VECTORIZE_EVLINDVARSIMPLIFY_H 15 #define LLVM_TRANSFORMS_VECTORIZE_EVLINDVARSIMPLIFY_H 16 17 #include "llvm/Analysis/LoopAnalysisManager.h" 18 #include "llvm/IR/PassManager.h" 19 20 namespace llvm { 21 class Loop; 22 class LPMUpdater; 23 24 /// Turn vectorized loops with canonical induction variables into loops that 25 /// only use a single EVL-based induction variable. 26 struct EVLIndVarSimplifyPass : public PassInfoMixin<EVLIndVarSimplifyPass> { 27 PreservedAnalyses run(Loop &L, LoopAnalysisManager &LAM, 28 LoopStandardAnalysisResults &AR, LPMUpdater &U); 29 }; 30 } // namespace llvm 31 #endif 32