clang API Documentation

Public Member Functions
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>

List of all members.

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.

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


Constructor & Destructor Documentation

clang::CodeGen::LoopInfoStack::LoopInfoStack ( ) [inline]

Definition at line 85 of file CGLoopInfo.h.


Member Function Documentation

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

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
void LoopInfoStack::push ( llvm::BasicBlock *  Header)

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

Set the vectorizer unroll for the next loop pushed.

Definition at line 119 of file CGLoopInfo.h.

References clang::CodeGen::LoopAttributes::VectorizerUnroll.

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


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