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

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...
 

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 82 of file CGLoopInfo.h.

Constructor & Destructor Documentation

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

Definition at line 87 of file CGLoopInfo.h.

Member Function Documentation

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

Return the top loop id metadata.

Definition at line 98 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 101 of file CGLoopInfo.h.

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

void LoopInfoStack::InsertHelper ( llvm::Instruction *  I) const
void LoopInfoStack::pop ( )
void LoopInfoStack::push ( llvm::BasicBlock *  Header,
llvm::ArrayRef< const Attr * >  Attrs = llvm::None 
)
void clang::CodeGen::LoopInfoStack::setParallel ( bool  Enable = true)
inline

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().

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

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.

void clang::CodeGen::LoopInfoStack::setVectorizerUnroll ( unsigned  U)
inline

Set the vectorizer unroll for the next loop pushed.

Definition at line 122 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 119 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::VectorizerWidth.

Referenced by emitSafelenClause().


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