clang  14.0.0git
Public Member Functions | List of all members
clang::CodeGen::LoopInfoStack Class Reference

A stack of loop information corresponding to loop nesting levels. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CGLoopInfo.h"

Public Member Functions

 LoopInfoStack ()
 
void push (llvm::BasicBlock *Header, const llvm::DebugLoc &StartLoc, const llvm::DebugLoc &EndLoc)
 Begin a new structured loop. More...
 
void push (llvm::BasicBlock *Header, clang::ASTContext &Ctx, const clang::CodeGenOptions &CGOpts, llvm::ArrayRef< const Attr * > Attrs, const llvm::DebugLoc &StartLoc, const llvm::DebugLoc &EndLoc, bool MustProgress=false)
 Begin a new structured loop. More...
 
void pop ()
 End the current loop. More...
 
llvm::MDNode * getCurLoopID () const
 Return the top loop id metadata. More...
 
bool getCurLoopParallel () const
 Return true if the top loop is parallel. More...
 
void InsertHelper (llvm::Instruction *I) const
 Function called by the CodeGenFunction when an instruction is created. More...
 
void setParallel (bool Enable=true)
 Set the next pushed loop as parallel. More...
 
void setVectorizeEnable (bool Enable=true)
 Set the next pushed loop 'vectorize.enable'. More...
 
void setDistributeState (bool Enable=true)
 Set the next pushed loop as a distribution candidate. More...
 
void setUnrollState (const LoopAttributes::LVEnableState &State)
 Set the next pushed loop unroll state. More...
 
void setVectorizePredicateState (const LoopAttributes::LVEnableState &State)
 Set the next pushed vectorize predicate state. More...
 
void setUnrollAndJamState (const LoopAttributes::LVEnableState &State)
 Set the next pushed loop unroll_and_jam state. More...
 
void setVectorizeWidth (unsigned W)
 Set the vectorize width for the next loop pushed. More...
 
void setVectorizeScalable (const LoopAttributes::LVEnableState &State)
 
void setInterleaveCount (unsigned C)
 Set the interleave count for the next loop pushed. More...
 
void setUnrollCount (unsigned C)
 Set the unroll count for the next loop pushed. More...
 
void setUnrollAndJamCount (unsigned C)
 Set the unroll count for the next loop pushed. More...
 
void setPipelineDisabled (bool S)
 Set the pipeline disabled state. More...
 
void setPipelineInitiationInterval (unsigned C)
 Set the pipeline initiation interval. More...
 
void setMustProgress (bool P)
 Set no progress for the next loop pushed. More...
 

Detailed Description

A stack of loop information corresponding to loop nesting levels.

This stack can be used to prepare attributes which are applied when a loop is emitted.

Definition at line 197 of file CGLoopInfo.h.

Constructor & Destructor Documentation

◆ LoopInfoStack()

clang::CodeGen::LoopInfoStack::LoopInfoStack ( )
inline

Definition at line 202 of file CGLoopInfo.h.

Member Function Documentation

◆ getCurLoopID()

llvm::MDNode* clang::CodeGen::LoopInfoStack::getCurLoopID ( ) const
inline

Return the top loop id metadata.

Definition at line 220 of file CGLoopInfo.h.

References clang::CodeGen::LoopInfo::getLoopID().

◆ getCurLoopParallel()

bool clang::CodeGen::LoopInfoStack::getCurLoopParallel ( ) const
inline

Return true if the top loop is parallel.

Definition at line 223 of file CGLoopInfo.h.

References clang::CodeGen::LoopInfo::getAttributes(), and clang::CodeGen::LoopAttributes::IsParallel.

◆ InsertHelper()

void LoopInfoStack::InsertHelper ( llvm::Instruction *  I) const

Function called by the CodeGenFunction when an instruction is created.

Definition at line 810 of file CGLoopInfo.cpp.

References clang::CodeGen::LoopInfo::getHeader(), and clang::CodeGen::LoopInfo::getLoopID().

◆ pop()

void LoopInfoStack::pop ( )

End the current loop.

Definition at line 804 of file CGLoopInfo.cpp.

◆ push() [1/2]

void clang::CodeGen::LoopInfoStack::push ( llvm::BasicBlock *  Header,
clang::ASTContext Ctx,
const clang::CodeGenOptions CGOpts,
llvm::ArrayRef< const Attr * >  Attrs,
const llvm::DebugLoc &  StartLoc,
const llvm::DebugLoc &  EndLoc,
bool  MustProgress = false 
)

Begin a new structured loop.

Stage attributes from the Attrs list. The staged attributes are applied to the loop and then cleared.

◆ push() [2/2]

void clang::CodeGen::LoopInfoStack::push ( llvm::BasicBlock *  Header,
const llvm::DebugLoc &  StartLoc,
const llvm::DebugLoc &  EndLoc 
)

Begin a new structured loop.

The set of staged attributes will be applied to the loop and then cleared.

◆ setDistributeState()

void clang::CodeGen::LoopInfoStack::setDistributeState ( bool  Enable = true)
inline

Set the next pushed loop as a distribution candidate.

Definition at line 241 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::Disable, clang::CodeGen::LoopAttributes::DistributeEnable, and clang::CodeGen::LoopAttributes::Enable.

◆ setInterleaveCount()

void clang::CodeGen::LoopInfoStack::setInterleaveCount ( unsigned  C)
inline

Set the interleave count for the next loop pushed.

Definition at line 269 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::InterleaveCount.

◆ setMustProgress()

void clang::CodeGen::LoopInfoStack::setMustProgress ( bool  P)
inline

Set no progress for the next loop pushed.

Definition at line 286 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::MustProgress, and P.

◆ setParallel()

void clang::CodeGen::LoopInfoStack::setParallel ( bool  Enable = true)
inline

Set the next pushed loop as parallel.

Definition at line 232 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::IsParallel.

Referenced by emitSimdlenSafelenClause().

◆ setPipelineDisabled()

void clang::CodeGen::LoopInfoStack::setPipelineDisabled ( bool  S)
inline

Set the pipeline disabled state.

Definition at line 278 of file CGLoopInfo.h.

◆ setPipelineInitiationInterval()

void clang::CodeGen::LoopInfoStack::setPipelineInitiationInterval ( unsigned  C)
inline

Set the pipeline initiation interval.

Definition at line 281 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::PipelineInitiationInterval.

◆ setUnrollAndJamCount()

void clang::CodeGen::LoopInfoStack::setUnrollAndJamCount ( unsigned  C)
inline

Set the unroll count for the next loop pushed.

Definition at line 275 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::UnrollAndJamCount.

◆ setUnrollAndJamState()

void clang::CodeGen::LoopInfoStack::setUnrollAndJamState ( const LoopAttributes::LVEnableState State)
inline

Set the next pushed loop unroll_and_jam state.

Definition at line 257 of file CGLoopInfo.h.

References State, and clang::CodeGen::LoopAttributes::UnrollAndJamEnable.

◆ setUnrollCount()

void clang::CodeGen::LoopInfoStack::setUnrollCount ( unsigned  C)
inline

Set the unroll count for the next loop pushed.

Definition at line 272 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::UnrollCount.

◆ setUnrollState()

void clang::CodeGen::LoopInfoStack::setUnrollState ( const LoopAttributes::LVEnableState State)
inline

Set the next pushed loop unroll state.

Definition at line 247 of file CGLoopInfo.h.

References State, and clang::CodeGen::LoopAttributes::UnrollEnable.

◆ setVectorizeEnable()

void clang::CodeGen::LoopInfoStack::setVectorizeEnable ( bool  Enable = true)
inline

Set the next pushed loop 'vectorize.enable'.

Definition at line 235 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::Disable, clang::CodeGen::LoopAttributes::Enable, and clang::CodeGen::LoopAttributes::VectorizeEnable.

◆ setVectorizePredicateState()

void clang::CodeGen::LoopInfoStack::setVectorizePredicateState ( const LoopAttributes::LVEnableState State)
inline

Set the next pushed vectorize predicate state.

Definition at line 252 of file CGLoopInfo.h.

References State, and clang::CodeGen::LoopAttributes::VectorizePredicateEnable.

◆ setVectorizeScalable()

void clang::CodeGen::LoopInfoStack::setVectorizeScalable ( const LoopAttributes::LVEnableState State)
inline

Definition at line 264 of file CGLoopInfo.h.

References State, and clang::CodeGen::LoopAttributes::VectorizeScalable.

◆ setVectorizeWidth()

void clang::CodeGen::LoopInfoStack::setVectorizeWidth ( unsigned  W)
inline

Set the vectorize width for the next loop pushed.

Definition at line 262 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::VectorizeWidth.

Referenced by emitSimdlenSafelenClause().


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