|
clang 24.0.0git
|
A stack of loop information corresponding to loop nesting levels. More...
#include "/work/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. | |
| 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. | |
| void | pop () |
| End the current loop. | |
| llvm::MDNode * | getCurLoopID () const |
| Return the top loop id metadata. | |
| bool | getCurLoopParallel () const |
| Return true if the top loop is parallel. | |
| void | InsertHelper (llvm::Instruction *I) const |
| Function called by the CodeGenFunction when an instruction is created. | |
| void | setParallel (bool Enable=true) |
| Set the next pushed loop as parallel. | |
| void | setVectorizeEnable (bool Enable=true) |
| Set the next pushed loop 'vectorize.enable'. | |
| void | setDistributeState (bool Enable=true) |
| Set the next pushed loop as a distribution candidate. | |
| void | setLICMDisabled (bool Disabled=true) |
| Set the next pushed loop LICM disable state. | |
| void | setUnrollState (const LoopAttributes::LVEnableState &State) |
| Set the next pushed loop unroll state. | |
| void | setVectorizePredicateState (const LoopAttributes::LVEnableState &State) |
| Set the next pushed vectorize predicate state. | |
| void | setUnrollAndJamState (const LoopAttributes::LVEnableState &State) |
| Set the next pushed loop unroll_and_jam state. | |
| void | setVectorizeWidth (unsigned W) |
| Set the vectorize width for the next loop pushed. | |
| void | setVectorizeScalable (const LoopAttributes::LVEnableState &State) |
| void | setInterleaveCount (unsigned C) |
| Set the interleave count for the next loop pushed. | |
| void | setUnrollCount (unsigned C) |
| Set the unroll count for the next loop pushed. | |
| void | setUnrollAndJamCount (unsigned C) |
| Set the unroll count for the next loop pushed. | |
| void | setPipelineDisabled (bool S) |
| Set the pipeline disabled state. | |
| void | setPipelineInitiationInterval (unsigned C) |
| Set the pipeline initiation interval. | |
| void | setCodeAlign (unsigned C) |
| Set value of code align for the next loop pushed. | |
| void | setMustProgress (bool P) |
| Set no progress for the next loop pushed. | |
| bool | hasInfo () const |
| Returns true if there is LoopInfo on the stack. | |
| const LoopInfo & | getInfo () const |
| Return the LoopInfo for the current loop. | |
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 158 of file CGLoopInfo.h.
|
inline |
Definition at line 163 of file CGLoopInfo.h.
|
inline |
Return the top loop id metadata.
Definition at line 181 of file CGLoopInfo.h.
References getInfo(), and clang::CodeGen::LoopInfo::getLoopID().
|
inline |
Return true if the top loop is parallel.
Definition at line 184 of file CGLoopInfo.h.
References clang::CodeGen::LoopInfo::getAttributes(), getInfo(), hasInfo(), and clang::CodeGenUtils::LoopAttributes::IsParallel.
|
inline |
Return the LoopInfo for the current loop.
HasInfo should be called first to ensure LoopInfo is present.
Definition at line 261 of file CGLoopInfo.h.
Referenced by getCurLoopID(), getCurLoopParallel(), and InsertHelper().
|
inline |
Returns true if there is LoopInfo on the stack.
Definition at line 258 of file CGLoopInfo.h.
Referenced by getCurLoopParallel(), and InsertHelper().
| void LoopInfoStack::InsertHelper | ( | llvm::Instruction * | I | ) | const |
Function called by the CodeGenFunction when an instruction is created.
Definition at line 583 of file CGLoopInfo.cpp.
References clang::cast(), clang::CodeGen::LoopInfo::getHeader(), getInfo(), clang::CodeGen::LoopInfo::getLoopID(), and hasInfo().
| void LoopInfoStack::pop | ( | ) |
End the current loop.
Definition at line 577 of file CGLoopInfo.cpp.
| 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.
| 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.
|
inline |
Set value of code align for the next loop pushed.
Definition at line 252 of file CGLoopInfo.h.
References clang::C.
Set the next pushed loop as a distribution candidate.
Definition at line 202 of file CGLoopInfo.h.
References clang::CodeGenUtils::LoopAttributes::Disable, and clang::CodeGenUtils::LoopAttributes::Enable.
|
inline |
Set the interleave count for the next loop pushed.
Definition at line 235 of file CGLoopInfo.h.
References clang::C.
Set the next pushed loop LICM disable state.
Definition at line 208 of file CGLoopInfo.h.
|
inline |
Set no progress for the next loop pushed.
Definition at line 255 of file CGLoopInfo.h.
Set the next pushed loop as parallel.
Definition at line 193 of file CGLoopInfo.h.
Referenced by applyConservativeSimdOrderedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), and emitSimdlenSafelenClause().
|
inline |
Set the pipeline disabled state.
Definition at line 244 of file CGLoopInfo.h.
|
inline |
Set the pipeline initiation interval.
Definition at line 247 of file CGLoopInfo.h.
References clang::C.
|
inline |
Set the unroll count for the next loop pushed.
Definition at line 241 of file CGLoopInfo.h.
References clang::C.
|
inline |
Set the next pushed loop unroll_and_jam state.
Definition at line 223 of file CGLoopInfo.h.
|
inline |
Set the unroll count for the next loop pushed.
Definition at line 238 of file CGLoopInfo.h.
References clang::C.
|
inline |
Set the next pushed loop unroll state.
Definition at line 213 of file CGLoopInfo.h.
Set the next pushed loop 'vectorize.enable'.
Definition at line 196 of file CGLoopInfo.h.
References clang::CodeGenUtils::LoopAttributes::Disable, and clang::CodeGenUtils::LoopAttributes::Enable.
Referenced by emitCommonSimdLoop().
|
inline |
Set the next pushed vectorize predicate state.
Definition at line 218 of file CGLoopInfo.h.
|
inline |
Definition at line 230 of file CGLoopInfo.h.
|
inline |
Set the vectorize width for the next loop pushed.
Definition at line 228 of file CGLoopInfo.h.
Referenced by emitSimdlenSafelenClause().