clang
3.7.0
|
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. More...
#include <CGLoopInfo.h>
Public Member Functions | |
LoopInfoStack () | |
void | push (llvm::BasicBlock *Header, llvm::ArrayRef< const Attr * > Attrs=llvm::None) |
Begin a new structured loop. The set of staged attributes will be applied to the loop and then cleared. 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 | setVectorizerEnable (bool Enable=true) |
Set the next pushed loop 'vectorizer.enable'. More... | |
void | setVectorizerWidth (unsigned W) |
Set the vectorizer width for the next loop pushed. More... | |
void | setVectorizerUnroll (unsigned U) |
Set the vectorizer unroll 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 82 of file CGLoopInfo.h.
|
inline |
Definition at line 87 of file CGLoopInfo.h.
|
inline |
Return the top loop id metadata.
Definition at line 98 of file CGLoopInfo.h.
References clang::CodeGen::LoopInfo::getLoopID().
|
inline |
Return true if the top loop is parallel.
Definition at line 101 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 119 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 114 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 LoopInfoStack::push | ( | llvm::BasicBlock * | Header, |
llvm::ArrayRef< const Attr * > | Attrs = llvm::None |
||
) |
Begin a new structured loop. The set of staged attributes will be applied to the loop and then cleared.
Definition at line 81 of file CGLoopInfo.cpp.
References clang::CodeGen::LoopAttributes::clear(), setParallel(), and State.
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXForRangeStmt(), clang::CodeGen::CodeGenFunction::EmitDoStmt(), clang::CodeGen::CodeGenFunction::EmitForStmt(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), and clang::CodeGen::CodeGenFunction::EmitWhileStmt().
Set the next pushed loop as parallel.
Definition at line 110 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::IsParallel.
Referenced by emitSafelenClause(), and push().
Set the next pushed loop 'vectorizer.enable'.
Definition at line 113 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::VecDisable, clang::CodeGen::LoopAttributes::VecEnable, and clang::CodeGen::LoopAttributes::VectorizerEnable.
|
inline |
Set the vectorizer unroll for the next loop pushed.
Definition at line 122 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::VectorizerUnroll.
|
inline |
Set the vectorizer width for the next loop pushed.
Definition at line 119 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::VectorizerWidth.
Referenced by emitSafelenClause().