class LoopVectorizeHints
Declaration
class LoopVectorizeHints { /* full declaration omitted */ };
Description
Utility class for getting and setting loop vectorizer hints in the form of loop metadata. This class keeps a number of loop annotations locally (as member variables) and can, upon request, write them back as metadata on the loop. It will initially scan the loop for existing metadata, and will update the local values based on information in the loop. We cannot write all values to metadata, as the mere presence of some info, for example 'force', means a decision has been made. So, we need to be careful NOT to add them if the user hasn't specifically asked so.
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:45
Method Overview
- public LoopVectorizeHints(const llvm::Loop * L, bool InterleaveOnlyWhenForced, llvm::OptimizationRemarkEmitter & ORE)
- public bool allowReordering() const
- public bool allowVectorization(llvm::Function * F, llvm::Loop * L, bool VectorizeOnlyWhenForced) const
- public void emitRemarkWithHints() const
- public enum ForceKind getForce() const
- public unsigned int getInterleave() const
- public unsigned int getIsVectorized() const
- public unsigned int getPredicate() const
- public unsigned int getWidth() const
- public bool isPotentiallyUnsafe() const
- public void setAlreadyVectorized()
- public void setPotentiallyUnsafe()
- public const char * vectorizeAnalysisPassName() const
Methods
¶LoopVectorizeHints(
const llvm::Loop* L,
bool InterleaveOnlyWhenForced,
llvm::OptimizationRemarkEmitter& ORE)
LoopVectorizeHints(
const llvm::Loop* L,
bool InterleaveOnlyWhenForced,
llvm::OptimizationRemarkEmitter& ORE)
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:89
Parameters
- const llvm::Loop* L
- bool InterleaveOnlyWhenForced
- llvm::OptimizationRemarkEmitter& ORE
¶bool allowReordering() const
bool allowReordering() const
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:116
¶bool allowVectorization(
llvm::Function* F,
llvm::Loop* L,
bool VectorizeOnlyWhenForced) const
bool allowVectorization(
llvm::Function* F,
llvm::Loop* L,
bool VectorizeOnlyWhenForced) const
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:95
Parameters
- llvm::Function* F
- llvm::Loop* L
- bool VectorizeOnlyWhenForced
¶void emitRemarkWithHints() const
void emitRemarkWithHints() const
Description
Dumps all the hint information.
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:99
¶enum ForceKind getForce() const
enum ForceKind getForce() const
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:105
¶unsigned int getInterleave() const
unsigned int getInterleave() const
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:102
¶unsigned int getIsVectorized() const
unsigned int getIsVectorized() const
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:103
¶unsigned int getPredicate() const
unsigned int getPredicate() const
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:104
¶unsigned int getWidth() const
unsigned int getWidth() const
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:101
¶bool isPotentiallyUnsafe() const
bool isPotentiallyUnsafe() const
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:125
¶void setAlreadyVectorized()
void setAlreadyVectorized()
Description
Mark the loop L as already vectorized by setting the width to 1.
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:93
¶void setPotentiallyUnsafe()
void setPotentiallyUnsafe()
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:134
¶const char* vectorizeAnalysisPassName() const
const char* vectorizeAnalysisPassName() const
Description
If hints are provided that force vectorization, use the AlwaysPrint pass name to force the frontend to print the diagnostic.
Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:114