LLVM  14.0.0git
Public Member Functions | List of all members
GeneratedRTChecks Class Reference

Helper struct to manage generating runtime checks for vectorization. More...

Public Member Functions

 GeneratedRTChecks (ScalarEvolution &SE, DominatorTree *DT, LoopInfo *LI, const DataLayout &DL)
 
void Create (Loop *L, const LoopAccessInfo &LAI, const SCEVUnionPredicate &UnionPred)
 Generate runtime checks in SCEVCheckBlock and MemCheckBlock, so we can accurately estimate the cost of the runtime checks. More...
 
 ~GeneratedRTChecks ()
 Remove the created SCEV & memory runtime check blocks & instructions, if unused. More...
 
BasicBlockemitSCEVChecks (Loop *L, BasicBlock *Bypass, BasicBlock *LoopVectorPreHeader, BasicBlock *LoopExitBlock)
 Adds the generated SCEVCheckBlock before LoopVectorPreHeader and adjusts the branches to branch to the vector preheader or Bypass, depending on the generated condition. More...
 
BasicBlockemitMemRuntimeChecks (Loop *L, BasicBlock *Bypass, BasicBlock *LoopVectorPreHeader)
 Adds the generated MemCheckBlock before LoopVectorPreHeader and adjusts the branches to branch to the vector preheader or Bypass, depending on the generated condition. More...
 

Detailed Description

Helper struct to manage generating runtime checks for vectorization.

The runtime checks are created up-front in temporary blocks to allow better estimating the cost and un-linked from the existing IR. After deciding to vectorize, the checks are moved back. If deciding not to vectorize, the temporary blocks are completely removed.

Definition at line 1914 of file LoopVectorize.cpp.

Constructor & Destructor Documentation

◆ GeneratedRTChecks()

GeneratedRTChecks::GeneratedRTChecks ( ScalarEvolution SE,
DominatorTree DT,
LoopInfo LI,
const DataLayout DL 
)
inline

Definition at line 1937 of file LoopVectorize.cpp.

◆ ~GeneratedRTChecks()

GeneratedRTChecks::~GeneratedRTChecks ( )
inline

Member Function Documentation

◆ Create()

void GeneratedRTChecks::Create ( Loop L,
const LoopAccessInfo LAI,
const SCEVUnionPredicate UnionPred 
)
inline

◆ emitMemRuntimeChecks()

BasicBlock* GeneratedRTChecks::emitMemRuntimeChecks ( Loop L,
BasicBlock Bypass,
BasicBlock LoopVectorPreHeader 
)
inline

◆ emitSCEVChecks()

BasicBlock* GeneratedRTChecks::emitSCEVChecks ( Loop L,
BasicBlock Bypass,
BasicBlock LoopVectorPreHeader,
BasicBlock LoopExitBlock 
)
inline

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