class LoopInfoStack
Declaration
class LoopInfoStack { /* full declaration omitted */ };
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.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:197
Member Variables
- private clang::CodeGen::LoopAttributes StagedAttrs
- The set of attributes that will be applied to the next pushed loop.
- private llvm::SmallVector<std::unique_ptr<LoopInfo>, 4> Active
- Stack of active loops.
Method Overview
- public void InsertHelper(llvm::Instruction * I) const
- public LoopInfoStack()
- private LoopInfoStack(const clang::CodeGen::LoopInfoStack &)
- public llvm::MDNode * getCurLoopID() const
- public bool getCurLoopParallel() const
- private const clang::CodeGen::LoopInfo & getInfo() const
- private bool hasInfo() const
- public void pop()
- public void push(llvm::BasicBlock * Header, clang::ASTContext & Ctx, const clang::CodeGenOptions & CGOpts, llvm::ArrayRef<const Attr *> Attrs, const llvm::DebugLoc & StartLoc, const llvm::DebugLoc & EndLoc, bool MustProgress = false)
- public void push(llvm::BasicBlock * Header, const llvm::DebugLoc & StartLoc, const llvm::DebugLoc & EndLoc)
- public void setDistributeState(bool Enable = true)
- public void setInterleaveCount(unsigned int C)
- public void setMustProgress(bool P)
- public void setParallel(bool Enable = true)
- public void setPipelineDisabled(bool S)
- public void setPipelineInitiationInterval(unsigned int C)
- public void setUnrollAndJamCount(unsigned int C)
- public void setUnrollAndJamState(const LoopAttributes::LVEnableState & State)
- public void setUnrollCount(unsigned int C)
- public void setUnrollState(const LoopAttributes::LVEnableState & State)
- public void setVectorizeEnable(bool Enable = true)
- public void setVectorizePredicateState(const LoopAttributes::LVEnableState & State)
- public void setVectorizeScalable(const LoopAttributes::LVEnableState & State)
- public void setVectorizeWidth(unsigned int W)
Methods
¶void InsertHelper(llvm::Instruction* I) const
void InsertHelper(llvm::Instruction* I) const
Description
Function called by the CodeGenFunction when an instruction is created.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:229
Parameters
¶LoopInfoStack()
LoopInfoStack()
Declared at: clang/lib/CodeGen/CGLoopInfo.h:202
¶LoopInfoStack(
const clang::CodeGen::LoopInfoStack&)
LoopInfoStack(
const clang::CodeGen::LoopInfoStack&)
Declared at: clang/lib/CodeGen/CGLoopInfo.h:198
Parameters
¶llvm::MDNode* getCurLoopID() const
llvm::MDNode* getCurLoopID() const
Description
Return the top loop id metadata.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:220
¶bool getCurLoopParallel() const
bool getCurLoopParallel() const
Description
Return true if the top loop is parallel.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:223
¶const clang::CodeGen::LoopInfo& getInfo() const
const clang::CodeGen::LoopInfo& getInfo() const
Description
Return the LoopInfo for the current loop. HasInfo should be called first to ensure LoopInfo is present.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:293
¶bool hasInfo() const
bool hasInfo() const
Description
Returns true if there is LoopInfo on the stack.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:290
¶void pop()
void pop()
Description
End the current loop.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:217
¶void push(llvm::BasicBlock* Header,
clang::ASTContext& Ctx,
const clang::CodeGenOptions& CGOpts,
llvm::ArrayRef<const Attr*> Attrs,
const llvm::DebugLoc& StartLoc,
const llvm::DebugLoc& EndLoc,
bool MustProgress = false)
void push(llvm::BasicBlock* Header,
clang::ASTContext& Ctx,
const clang::CodeGenOptions& CGOpts,
llvm::ArrayRef<const Attr*> Attrs,
const llvm::DebugLoc& StartLoc,
const llvm::DebugLoc& EndLoc,
bool MustProgress = false)
Description
Begin a new structured loop. Stage attributes from the Attrs list. The staged attributes are applied to the loop and then cleared.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:211
Parameters
- llvm::BasicBlock* Header
- clang::ASTContext& Ctx
- const clang::CodeGenOptions& CGOpts
- llvm::ArrayRef<const Attr*> Attrs
- const llvm::DebugLoc& StartLoc
- const llvm::DebugLoc& EndLoc
- bool MustProgress = false
¶void push(llvm::BasicBlock* Header,
const llvm::DebugLoc& StartLoc,
const llvm::DebugLoc& EndLoc)
void push(llvm::BasicBlock* Header,
const llvm::DebugLoc& StartLoc,
const llvm::DebugLoc& EndLoc)
Description
Begin a new structured loop. The set of staged attributes will be applied to the loop and then cleared.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:206
Parameters
- llvm::BasicBlock* Header
- const llvm::DebugLoc& StartLoc
- const llvm::DebugLoc& EndLoc
¶void setDistributeState(bool Enable = true)
void setDistributeState(bool Enable = true)
Description
Set the next pushed loop as a distribution candidate.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:241
Parameters
- bool Enable = true
¶void setInterleaveCount(unsigned int C)
void setInterleaveCount(unsigned int C)
Description
Set the interleave count for the next loop pushed.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:269
Parameters
- unsigned int C
¶void setMustProgress(bool P)
void setMustProgress(bool P)
Description
Set no progress for the next loop pushed.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:286
Parameters
- bool P
¶void setParallel(bool Enable = true)
void setParallel(bool Enable = true)
Description
Set the next pushed loop as parallel.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:232
Parameters
- bool Enable = true
¶void setPipelineDisabled(bool S)
void setPipelineDisabled(bool S)
Description
Set the pipeline disabled state.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:278
Parameters
- bool S
¶void setPipelineInitiationInterval(unsigned int C)
void setPipelineInitiationInterval(unsigned int C)
Description
Set the pipeline initiation interval.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:281
Parameters
- unsigned int C
¶void setUnrollAndJamCount(unsigned int C)
void setUnrollAndJamCount(unsigned int C)
Description
Set the unroll count for the next loop pushed.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:275
Parameters
- unsigned int C
¶void setUnrollAndJamState(
const LoopAttributes::LVEnableState& State)
void setUnrollAndJamState(
const LoopAttributes::LVEnableState& State)
Description
Set the next pushed loop unroll_and_jam state.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:257
Parameters
- const LoopAttributes::LVEnableState& State
¶void setUnrollCount(unsigned int C)
void setUnrollCount(unsigned int C)
Description
Set the unroll count for the next loop pushed.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:272
Parameters
- unsigned int C
¶void setUnrollState(
const LoopAttributes::LVEnableState& State)
void setUnrollState(
const LoopAttributes::LVEnableState& State)
Description
Set the next pushed loop unroll state.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:247
Parameters
- const LoopAttributes::LVEnableState& State
¶void setVectorizeEnable(bool Enable = true)
void setVectorizeEnable(bool Enable = true)
Description
Set the next pushed loop 'vectorize.enable'
Declared at: clang/lib/CodeGen/CGLoopInfo.h:235
Parameters
- bool Enable = true
¶void setVectorizePredicateState(
const LoopAttributes::LVEnableState& State)
void setVectorizePredicateState(
const LoopAttributes::LVEnableState& State)
Description
Set the next pushed vectorize predicate state.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:252
Parameters
- const LoopAttributes::LVEnableState& State
¶void setVectorizeScalable(
const LoopAttributes::LVEnableState& State)
void setVectorizeScalable(
const LoopAttributes::LVEnableState& State)
Declared at: clang/lib/CodeGen/CGLoopInfo.h:264
Parameters
- const LoopAttributes::LVEnableState& State
¶void setVectorizeWidth(unsigned int W)
void setVectorizeWidth(unsigned int W)
Description
Set the vectorize width for the next loop pushed.
Declared at: clang/lib/CodeGen/CGLoopInfo.h:262
Parameters
- unsigned int W