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

Methods

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

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

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

Description

Dumps all the hint information.

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

enum ForceKind getForce() const

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

unsigned int getInterleave() const

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

unsigned int getIsVectorized() const

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

unsigned int getPredicate() const

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

unsigned int getWidth() const

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

bool isPotentiallyUnsafe() const

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

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()

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

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