LLVM  8.0.1
Public Member Functions | List of all members
llvm::LoopVectorizationRequirements Class Reference

This holds vectorization requirements that must be verified late in the process. More...

#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"

Public Member Functions

 LoopVectorizationRequirements (OptimizationRemarkEmitter &ORE)
 
void addUnsafeAlgebraInst (Instruction *I)
 
void addRuntimePointerChecks (unsigned Num)
 
bool doesNotMeet (Function *F, Loop *L, const LoopVectorizeHints &Hints)
 

Detailed Description

This holds vectorization requirements that must be verified late in the process.

The requirements are set by legalize and costmodel. Once vectorization has been determined to be possible and profitable the requirements can be verified by looking for metadata or compiler options. For example, some loops require FP commutativity which is only allowed if vectorization is explicitly specified or if the fast-math compiler option has been provided. Late evaluation of these requirements allows helpful diagnostics to be composed that tells the user what need to be done to vectorize the loop. For example, by specifying #pragma clang loop vectorize or -ffast-math. Late evaluation should be used only when diagnostics can generated that can be followed by a non-expert user.

Definition at line 183 of file LoopVectorizationLegality.h.

Constructor & Destructor Documentation

◆ LoopVectorizationRequirements()

llvm::LoopVectorizationRequirements::LoopVectorizationRequirements ( OptimizationRemarkEmitter ORE)
inline

Definition at line 185 of file LoopVectorizationLegality.h.

Member Function Documentation

◆ addRuntimePointerChecks()

void llvm::LoopVectorizationRequirements::addRuntimePointerChecks ( unsigned  Num)
inline

Definition at line 193 of file LoopVectorizationLegality.h.

References F().

◆ addUnsafeAlgebraInst()

void llvm::LoopVectorizationRequirements::addUnsafeAlgebraInst ( Instruction I)
inline

Definition at line 187 of file LoopVectorizationLegality.h.

References I.

◆ doesNotMeet()

bool llvm::LoopVectorizationRequirements::doesNotMeet ( Function F,
Loop L,
const LoopVectorizeHints Hints 
)

The documentation for this class was generated from the following files: