|
LLVM 24.0.0git
|
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. | |
| LLVM_ABI bool | isAlignmentSupported (ArrayRef< Value * > Values) const |
| LLVM_ABI const LegalityResult & | canVectorize (BndlRef< Value * > Bndl, bool SkipScheduling=false) |
Checks if it's legal to vectorize the instructions in Bndl. | |
| const LegalityResult & | getForcedPackForDebugging () |
| \Returns a Pack with reason 'ForcePackForDebugging'. | |
| LLVM_ABI void | clear () |
Static Public Member Functions | |
| template<typename ValueT> | |
| static bool | differentBlock (BndlRef< ValueT * > Instrs) |
| template<typename ValueT> | |
| static bool | areUnique (BndlRef< ValueT * > Values) |
Performs the legality analysis and returns a LegalityResult object.
Definition at line 322 of file Legality.h.
|
inline |
Definition at line 342 of file Legality.h.
|
inlinestatic |
Values are unique. Definition at line 364 of file Legality.h.
References llvm::from_range, and llvm::Values.
Referenced by canVectorize().
| const LegalityResult & llvm::sandboxir::LegalityAnalysis::canVectorize | ( | BndlRef< Value * > | Bndl, |
| bool | SkipScheduling = false ) |
Checks if it's legal to vectorize the instructions in Bndl.
\Returns a LegalityResult object owned by LegalityAnalysis. SkipScheduling skips the scheduler check and is only meant for testing.
Definition at line 236 of file Legality.cpp.
References llvm::sandboxir::AlignmentNotSupported, llvm::any_of(), areUnique(), llvm::sandboxir::CantSchedule, llvm::cast(), createLegalityResult(), llvm::sandboxir::DiffBBs, differentBlock(), llvm::isa(), isAlignmentSupported(), llvm::sandboxir::NotInstructions, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::sandboxir::RepeatedInstrs, llvm::SmallVectorImpl< T >::reserve(), and llvm::ArrayRef< T >::size().
| void llvm::sandboxir::LegalityAnalysis::clear | ( | ) |
Definition at line 279 of file Legality.cpp.
|
inline |
A LegalityResult factory.
Definition at line 348 of file Legality.h.
References llvm::cast().
Referenced by canVectorize(), and getForcedPackForDebugging().
|
inlinestatic |
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().
|
inline |
\Returns a Pack with reason 'ForcePackForDebugging'.
Definition at line 380 of file Legality.h.
References createLegalityResult(), and llvm::sandboxir::ForcePackForDebugging.
Values has alignment that is supported by the target. Definition at line 217 of file Legality.cpp.
References llvm::cast(), llvm::Triple::empty(), llvm::Fast, llvm::sandboxir::Value::getContext(), llvm::sandboxir::Utils::getExpectedType(), llvm::sandboxir::getLoadStoreAddressSpace(), llvm::sandboxir::getLoadStoreAlignment(), llvm::sandboxir::Utils::getNumBits(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::sandboxir::Instruction::getParent(), llvm::Module::getTargetTriple(), llvm::isa(), llvm::sandboxir::Utils::TTIAllowsMisalignedMemoryAccesses(), and llvm::Values.
Referenced by canVectorize().