|
clang
5.0.0
|
A stack of loop information corresponding to loop nesting levels. More...
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, llvm::ArrayRef< const Attr * > Attrs, const llvm::DebugLoc &StartLoc, const llvm::DebugLoc &EndLoc) |
| 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 | setVectorizeWidth (unsigned W) |
| Set the vectorize width for the next loop pushed. More... | |
| 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... | |
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 93 of file CGLoopInfo.h.
|
inline |
Definition at line 98 of file CGLoopInfo.h.
|
inline |
Return the top loop id metadata.
Definition at line 115 of file CGLoopInfo.h.
References clang::CodeGen::LoopInfo::getLoopID().
|
inline |
Return true if the top loop is parallel.
Definition at line 118 of file CGLoopInfo.h.
References clang::CodeGen::LoopInfo::getAttributes(), and clang::CodeGen::LoopAttributes::IsParallel.
| void LoopInfoStack::InsertHelper | ( | llvm::Instruction * | I | ) | const |
Function called by the CodeGenFunction when an instruction is created.
Definition at line 286 of file CGLoopInfo.cpp.
References clang::CodeGen::LoopInfo::getAttributes(), clang::CodeGen::LoopInfo::getHeader(), clang::CodeGen::LoopInfo::getLoopID(), and clang::CodeGen::LoopAttributes::IsParallel.
Referenced by clang::CodeGen::CodeGenFunction::InsertHelper().
| void LoopInfoStack::pop | ( | ) |
End the current loop.
Definition at line 281 of file CGLoopInfo.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXForRangeStmt(), clang::CodeGen::CodeGenFunction::EmitDoStmt(), clang::CodeGen::CodeGenFunction::EmitForStmt(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), and clang::CodeGen::CodeGenFunction::EmitWhileStmt().
| 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.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXForRangeStmt(), clang::CodeGen::CodeGenFunction::EmitDoStmt(), clang::CodeGen::CodeGenFunction::EmitForStmt(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), and clang::CodeGen::CodeGenFunction::EmitWhileStmt().
| void clang::CodeGen::LoopInfoStack::push | ( | llvm::BasicBlock * | Header, |
| clang::ASTContext & | Ctx, | ||
| llvm::ArrayRef< const Attr * > | Attrs, | ||
| const llvm::DebugLoc & | StartLoc, | ||
| const llvm::DebugLoc & | EndLoc | ||
| ) |
Begin a new structured loop.
Stage attributes from the Attrs list. The staged attributes are applied to the loop and then cleared.
Set the next pushed loop as a distribution candidate.
Definition at line 136 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::Disable, clang::CodeGen::LoopAttributes::DistributeEnable, and clang::CodeGen::LoopAttributes::Enable.
|
inline |
Set the interleave count for the next loop pushed.
Definition at line 150 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::InterleaveCount.
Set the next pushed loop as parallel.
Definition at line 127 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::IsParallel.
Referenced by emitSimdlenSafelenClause().
|
inline |
Set the unroll count for the next loop pushed.
Definition at line 153 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::UnrollCount.
|
inline |
Set the next pushed loop unroll state.
Definition at line 142 of file CGLoopInfo.h.
References State, and clang::CodeGen::LoopAttributes::UnrollEnable.
Set the next pushed loop 'vectorize.enable'.
Definition at line 130 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::Disable, clang::CodeGen::LoopAttributes::Enable, and clang::CodeGen::LoopAttributes::VectorizeEnable.
|
inline |
Set the vectorize width for the next loop pushed.
Definition at line 147 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::VectorizeWidth.
Referenced by emitSimdlenSafelenClause().
1.8.6