LLVM 23.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, Context &Ctx, InstrMaps &IMaps)
template<typename ResultT, typename... ArgsT>
ResultT & createLegalityResult (ArgsT &&...Args)
 A LegalityResult factory.
LLVM_ABI const LegalityResultcanVectorize (ArrayRef< Value * > Bndl, bool SkipScheduling=false)
 Checks if it's legal to vectorize the instructions in Bndl.
const LegalityResultgetForcedPackForDebugging ()
 \Returns a Pack with reason 'ForcePackForDebugging'.
LLVM_ABI void clear ()

Static Public Member Functions

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

Detailed Description

Performs the legality analysis and returns a LegalityResult object.

Definition at line 318 of file Legality.h.

Constructor & Destructor Documentation

◆ LegalityAnalysis()

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

Definition at line 337 of file Legality.h.

Member Function Documentation

◆ areUnique()

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

Definition at line 358 of file Legality.h.

References llvm::from_range, llvm::ArrayRef< T >::size(), and llvm::SmallPtrSetImplBase::size().

Referenced by canVectorize().

◆ canVectorize()

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

◆ clear()

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

Definition at line 256 of file Legality.cpp.

◆ createLegalityResult()

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

A LegalityResult factory.

Definition at line 342 of file Legality.h.

References llvm::cast().

Referenced by canVectorize(), and getForcedPackForDebugging().

◆ differentBlock()

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

Definition at line 350 of file Legality.h.

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

Referenced by canVectorize().

◆ getForcedPackForDebugging()

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

\Returns a Pack with reason 'ForcePackForDebugging'.

Definition at line 370 of file Legality.h.

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


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