LLVM 24.0.0git
llvm::sandboxir::LegalityAnalysis Class Reference

Performs the legality analysis and returns a LegalityResult object. More...

#include "llvm/Transforms/Vectorize/SandboxVectorizer/Legality.h"

Public Member Functions

 LegalityAnalysis (AAResults &AA, ScalarEvolution &SE, const DataLayout &DL, TargetTransformInfo &TTI, Context &Ctx, InstrMaps &IMaps, SchedDirection Dir)
template<typename ResultT, typename... ArgsT>
ResultT & createLegalityResult (ArgsT &&...Args)
 A LegalityResult factory.
template<typename ValueT>
LLVM_ABI bool isAlignmentSupported (BndlRef< ValueT * > Values) const
LLVM_ABI const LegalityResult & canVectorize (BndlRef< Value * > Bndl, bool SkipScheduling=false)
 Checks if it's legal to vectorize the instructions in Bndl.
LLVM_ABI const LegalityResult & canVectorizeLSV (BndlRef< Instruction * > Bndl)
 Similar to canVectorize() but specific to LoadStoreVec.
const LegalityResult & getForcedPackForDebugging ()
 \Returns a Pack with reason 'ForcePackForDebugging'.
LLVM_ABI void clear ()
template<typename ValueT>
bool isAlignmentSupported (BndlRef< ValueT * > Values) const

Static Public Member Functions

template<typename ValueT>
static bool differentBlock (BndlRef< ValueT * > Instrs)
template<typename ValueT>
static bool areUnique (BndlRef< ValueT * > Values)

Detailed Description

Performs the legality analysis and returns a LegalityResult object.

Definition at line 322 of file Legality.h.

Constructor & Destructor Documentation

◆ LegalityAnalysis()

llvm::sandboxir::LegalityAnalysis::LegalityAnalysis ( AAResults & AA,
ScalarEvolution & SE,
const DataLayout & DL,
TargetTransformInfo & TTI,
Context & Ctx,
InstrMaps & IMaps,
SchedDirection Dir )
inline

Definition at line 342 of file Legality.h.

Member Function Documentation

◆ areUnique()

template<typename ValueT>
bool llvm::sandboxir::LegalityAnalysis::areUnique ( BndlRef< ValueT * > Values)
inlinestatic
Returns
true if all values in Values are unique.

Definition at line 364 of file Legality.h.

References llvm::from_range, and llvm::Values.

Referenced by canVectorize(), and canVectorizeLSV().

◆ canVectorize()

const LegalityResult & llvm::sandboxir::LegalityAnalysis::canVectorize ( BndlRef< Value * > Bndl,
bool SkipScheduling = false )

◆ canVectorizeLSV()

◆ clear()

void llvm::sandboxir::LegalityAnalysis::clear ( )

Definition at line 314 of file Legality.cpp.

◆ createLegalityResult()

template<typename ResultT, typename... ArgsT>
ResultT & llvm::sandboxir::LegalityAnalysis::createLegalityResult ( ArgsT &&... Args)
inline

A LegalityResult factory.

Definition at line 348 of file Legality.h.

References llvm::cast().

Referenced by canVectorize(), canVectorizeLSV(), and getForcedPackForDebugging().

◆ differentBlock()

template<typename ValueT>
bool llvm::sandboxir::LegalityAnalysis::differentBlock ( BndlRef< ValueT * > Instrs)
inlinestatic
Returns
true if Instrs are in different blocks.

Definition at line 356 of file Legality.h.

References llvm::any_of(), llvm::cast(), and llvm::drop_begin().

Referenced by canVectorize(), and canVectorizeLSV().

◆ getForcedPackForDebugging()

const LegalityResult & llvm::sandboxir::LegalityAnalysis::getForcedPackForDebugging ( )
inline

\Returns a Pack with reason 'ForcePackForDebugging'.

Definition at line 384 of file Legality.h.

References createLegalityResult(), and llvm::sandboxir::ForcePackForDebugging.

◆ isAlignmentSupported() [1/2]

template<typename ValueT>
LLVM_ABI bool llvm::sandboxir::LegalityAnalysis::isAlignmentSupported ( BndlRef< ValueT * > Values) const
Returns
true if the alignment of the vector composed of Values has alignment that is supported by the target.

References LLVM_ABI, and llvm::Values.

Referenced by canVectorize(), and canVectorizeLSV().

◆ isAlignmentSupported() [2/2]


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