clang API Documentation
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) |
| Begin a new structured loop. The set of staged attributes will be applied to the loop and then cleared. | |
| 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 | setVectorizerEnable (bool Enable=true) |
| Set the next pushed loop 'vectorizer.enable'. | |
| void | setVectorizerWidth (unsigned W) |
| Set the vectorizer width for the next loop pushed. | |
| void | setVectorizerUnroll (unsigned U) |
| Set the vectorizer unroll for the next loop pushed. | |
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 80 of file CGLoopInfo.h.
| clang::CodeGen::LoopInfoStack::LoopInfoStack | ( | ) | [inline] |
Definition at line 85 of file CGLoopInfo.h.
| llvm::MDNode* clang::CodeGen::LoopInfoStack::getCurLoopID | ( | ) | const [inline] |
Return the top loop id metadata.
Definition at line 95 of file CGLoopInfo.h.
References clang::CodeGen::LoopInfo::getLoopID().
| bool clang::CodeGen::LoopInfoStack::getCurLoopParallel | ( | ) | const [inline] |
Return true if the top loop is parallel.
Definition at line 98 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 93 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 88 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 | ) |
Begin a new structured loop. The set of staged attributes will be applied to the loop and then cleared.
Definition at line 82 of file CGLoopInfo.cpp.
References clang::CodeGen::LoopAttributes::clear().
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::setParallel | ( | bool | Enable = true | ) | [inline] |
Set the next pushed loop as parallel.
Definition at line 107 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::IsParallel.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
| void clang::CodeGen::LoopInfoStack::setVectorizerEnable | ( | bool | Enable = true | ) | [inline] |
Set the next pushed loop 'vectorizer.enable'.
Definition at line 110 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::VecDisable, clang::CodeGen::LoopAttributes::VecEnable, and clang::CodeGen::LoopAttributes::VectorizerEnable.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().
| void clang::CodeGen::LoopInfoStack::setVectorizerUnroll | ( | unsigned | U | ) | [inline] |
Set the vectorizer unroll for the next loop pushed.
Definition at line 119 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::VectorizerUnroll.
| void clang::CodeGen::LoopInfoStack::setVectorizerWidth | ( | unsigned | W | ) | [inline] |
Set the vectorizer width for the next loop pushed.
Definition at line 116 of file CGLoopInfo.h.
References clang::CodeGen::LoopAttributes::VectorizerWidth.
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPSimdDirective().