LLVM  16.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::VectorizationFactor Struct Reference

TODO: The following VectorizationFactor was pulled out of LoopVectorizationCostModel class. More...

#include "Transforms/Vectorize/LoopVectorizationPlanner.h"

Collaboration diagram for llvm::VectorizationFactor:
Collaboration graph
[legend]

Public Member Functions

 VectorizationFactor (ElementCount Width, InstructionCost Cost, InstructionCost ScalarCost)
 
bool operator== (const VectorizationFactor &rhs) const
 
bool operator!= (const VectorizationFactor &rhs) const
 

Static Public Member Functions

static VectorizationFactor Disabled ()
 Width 1 means no vectorization, cost 0 means uncomputed cost. More...
 

Public Attributes

ElementCount Width
 Vector width with best cost. More...
 
InstructionCost Cost
 Cost of the loop with that width. More...
 
InstructionCost ScalarCost
 Cost of the scalar loop. More...
 
ElementCount MinProfitableTripCount
 The minimum trip count required to make vectorization profitable, e.g. More...
 

Detailed Description

TODO: The following VectorizationFactor was pulled out of LoopVectorizationCostModel class.

LV also deals with VectorizerParams::VectorizationFactor and VectorizationCostTy. We need to streamline them. Information about vectorization costs.

Definition at line 188 of file LoopVectorizationPlanner.h.

Constructor & Destructor Documentation

◆ VectorizationFactor()

llvm::VectorizationFactor::VectorizationFactor ( ElementCount  Width,
InstructionCost  Cost,
InstructionCost  ScalarCost 
)
inline

Definition at line 202 of file LoopVectorizationPlanner.h.

Member Function Documentation

◆ Disabled()

static VectorizationFactor llvm::VectorizationFactor::Disabled ( )
inlinestatic

◆ operator!=()

bool llvm::VectorizationFactor::operator!= ( const VectorizationFactor rhs) const
inline

Definition at line 215 of file LoopVectorizationPlanner.h.

◆ operator==()

bool llvm::VectorizationFactor::operator== ( const VectorizationFactor rhs) const
inline

Definition at line 211 of file LoopVectorizationPlanner.h.

References Cost, and Width.

Member Data Documentation

◆ Cost

InstructionCost llvm::VectorizationFactor::Cost

◆ MinProfitableTripCount

ElementCount llvm::VectorizationFactor::MinProfitableTripCount

The minimum trip count required to make vectorization profitable, e.g.

due to runtime checks.

Definition at line 200 of file LoopVectorizationPlanner.h.

Referenced by llvm::LoopVectorizePass::processLoop().

◆ ScalarCost

InstructionCost llvm::VectorizationFactor::ScalarCost

Cost of the scalar loop.

Definition at line 196 of file LoopVectorizationPlanner.h.

Referenced by llvm::LoopVectorizationCostModel::selectVectorizationFactor().

◆ Width

ElementCount llvm::VectorizationFactor::Width

The documentation for this struct was generated from the following file: