class LoopVectorizationRequirements

Declaration

class LoopVectorizationRequirements { /* full declaration omitted */ };

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.

Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:162

Method Overview

Methods

LoopVectorizationRequirements(
    llvm::OptimizationRemarkEmitter& ORE)

Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:164

Parameters

llvm::OptimizationRemarkEmitter& ORE

void addRuntimePointerChecks(unsigned int Num)

Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:172

Parameters

unsigned int Num

void addUnsafeAlgebraInst(llvm::Instruction* I)

Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:166

Parameters

llvm::Instruction* I

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

Declared at: llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h:174

Parameters

llvm::Function* F
llvm::Loop* L
const llvm::LoopVectorizeHints& Hints