LLVM 20.0.0git
Public Member Functions | List of all members
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)
 
template<typename ResultT , typename... ArgsT>
ResultT & createLegalityResult (ArgsT... Args)
 A LegalityResult factory.
 
const LegalityResultcanVectorize (ArrayRef< Value * > Bndl, bool SkipScheduling=false)
 Checks if it's legal to vectorize the instructions in Bndl.
 

Detailed Description

Performs the legality analysis and returns a LegalityResult object.

Definition at line 152 of file Legality.h.

Constructor & Destructor Documentation

◆ LegalityAnalysis()

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

Definition at line 165 of file Legality.h.

References DL.

Member Function Documentation

◆ canVectorize()

const LegalityResult & llvm::sandboxir::LegalityAnalysis::canVectorize ( ArrayRef< 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 187 of file Legality.cpp.

References llvm::any_of(), llvm::sandboxir::CantSchedule, llvm::dbgs(), llvm::sandboxir::dumpBndl(), LLVM_DEBUG, llvm::sandboxir::NotInstructions, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), llvm::ArrayRef< T >::size(), and llvm::sandboxir::Scheduler::trySchedule().

◆ createLegalityResult()

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

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