//===- LoopVectorizationPlanner.h - Planner for LoopVectorization ---------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// \file /// This file provides a LoopVectorizationPlanner class. /// InnerLoopVectorizer vectorizes loops which contain only one basic /// LoopVectorizationPlanner - drives the vectorization process after having /// passed Legality checks. /// The planner builds and optimizes the Vectorization Plans which record the /// decisions how to vectorize the given loop. In particular, represent the /// control-flow of the vectorized version, the replication of instructions that /// are to be scalarized, and interleave access groups. /// /// Also provides a VPlan-based builder utility analogous to IRBuilder. /// It provides an instruction-level API for generating VPInstructions while /// abstracting away the Recipe manipulation details. //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_VECTORIZE_LOOPVECTORIZATIONPLANNER_H #define LLVM_TRANSFORMS_VECTORIZE_LOOPVECTORIZATIONPLANNER_H #include "VPlan.h" #include "llvm/ADT/SmallSet.h" #include "llvm/Support/InstructionCost.h" namespace llvm { class LoopInfo; class DominatorTree; class LoopVectorizationLegality; class LoopVectorizationCostModel; class PredicatedScalarEvolution; class LoopVectorizeHints; class OptimizationRemarkEmitter; class TargetTransformInfo; class TargetLibraryInfo; class VPRecipeBuilder; /// VPlan-based builder utility analogous to IRBuilder. class VPBuilder { … }; /// TODO: The following VectorizationFactor was pulled out of /// LoopVectorizationCostModel class. LV also deals with /// VectorizerParams::VectorizationFactor. /// We need to streamline them. /// Information about vectorization costs. struct VectorizationFactor { … }; /// A class that represents two vectorization factors (initialized with 0 by /// default). One for fixed-width vectorization and one for scalable /// vectorization. This can be used by the vectorizer to choose from a range of /// fixed and/or scalable VFs in order to find the most cost-effective VF to /// vectorize with. struct FixedScalableVFPair { … }; /// Planner drives the vectorization process after having passed /// Legality checks. class LoopVectorizationPlanner { … }; } // namespace llvm #endif // LLVM_TRANSFORMS_VECTORIZE_LOOPVECTORIZATIONPLANNER_H