Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
CFInfo Struct Reference
Collaboration diagram for CFInfo:
Collaboration graph
[legend]

Public Types

enum  CFType {
  If, Loop, ForeachRegular, ForeachActive,
  ForeachUnique, Switch
}
 

Public Member Functions

bool IsIf ()
 
bool IsLoop ()
 
bool IsForeach ()
 
bool IsSwitch ()
 
bool IsVarying ()
 
bool IsUniform ()
 

Static Public Member Functions

static CFInfoGetIf (bool isUniform, llvm::Value *savedMask)
 
static CFInfoGetLoop (bool isUniform, llvm::BasicBlock *breakTarget, llvm::BasicBlock *continueTarget, llvm::Value *savedBreakLanesPtr, llvm::Value *savedContinueLanesPtr, llvm::Value *savedMask, llvm::Value *savedBlockEntryMask)
 
static CFInfoGetForeach (FunctionEmitContext::ForeachType ft, llvm::BasicBlock *breakTarget, llvm::BasicBlock *continueTarget, llvm::Value *savedBreakLanesPtr, llvm::Value *savedContinueLanesPtr, llvm::Value *savedMask, llvm::Value *savedBlockEntryMask)
 
static CFInfoGetSwitch (bool isUniform, llvm::BasicBlock *breakTarget, llvm::BasicBlock *continueTarget, llvm::Value *savedBreakLanesPtr, llvm::Value *savedContinueLanesPtr, llvm::Value *savedMask, llvm::Value *savedBlockEntryMask, llvm::Value *switchExpr, llvm::BasicBlock *bbDefault, const std::vector< std::pair< int, llvm::BasicBlock *>> *bbCases, const std::map< llvm::BasicBlock *, llvm::BasicBlock *> *bbNext, bool scUniform)
 

Public Attributes

CFType type
 
bool isUniform
 
llvm::BasicBlock * savedBreakTarget
 
llvm::BasicBlock * savedContinueTarget
 
llvm::Value * savedBreakLanesPtr
 
llvm::Value * savedContinueLanesPtr
 
llvm::Value * savedMask
 
llvm::Value * savedBlockEntryMask
 
llvm::Value * savedSwitchExpr
 
llvm::BasicBlock * savedDefaultBlock
 
const std::vector< std::pair< int, llvm::BasicBlock * > > * savedCaseBlocks
 
const std::map< llvm::BasicBlock *, llvm::BasicBlock * > * savedNextBlocks
 
bool savedSwitchConditionWasUniform
 

Private Member Functions

 CFInfo (CFType t, bool uniformIf, llvm::Value *sm)
 
 CFInfo (CFType t, bool iu, llvm::BasicBlock *bt, llvm::BasicBlock *ct, llvm::Value *sb, llvm::Value *sc, llvm::Value *sm, llvm::Value *lm, llvm::Value *sse=NULL, llvm::BasicBlock *bbd=NULL, const std::vector< std::pair< int, llvm::BasicBlock *>> *bbc=NULL, const std::map< llvm::BasicBlock *, llvm::BasicBlock *> *bbn=NULL, bool scu=false)
 
 CFInfo (CFType t, llvm::BasicBlock *bt, llvm::BasicBlock *ct, llvm::Value *sb, llvm::Value *sc, llvm::Value *sm, llvm::Value *lm)
 

Detailed Description

This is a small utility structure that records information related to one level of nested control flow. It's mostly used in correctly restoring the mask and other state as we exit control flow nesting levels.

Definition at line 59 of file ctx.cpp.

Member Enumeration Documentation

◆ CFType

Enumerator
If 
Loop 
ForeachRegular 
ForeachActive 
ForeachUnique 
Switch 

Definition at line 89 of file ctx.cpp.

Constructor & Destructor Documentation

◆ CFInfo() [1/3]

CFInfo::CFInfo ( CFType  t,
bool  uniformIf,
llvm::Value *  sm 
)
inlineprivate

Definition at line 102 of file ctx.cpp.

References Assert, and If.

Referenced by GetForeach(), GetIf(), GetLoop(), and GetSwitch().

◆ CFInfo() [2/3]

CFInfo::CFInfo ( CFType  t,
bool  iu,
llvm::BasicBlock *  bt,
llvm::BasicBlock *  ct,
llvm::Value *  sb,
llvm::Value *  sc,
llvm::Value *  sm,
llvm::Value *  lm,
llvm::Value *  sse = NULL,
llvm::BasicBlock *  bbd = NULL,
const std::vector< std::pair< int, llvm::BasicBlock *>> *  bbc = NULL,
const std::map< llvm::BasicBlock *, llvm::BasicBlock *> *  bbn = NULL,
bool  scu = false 
)
inlineprivate

Definition at line 115 of file ctx.cpp.

References Assert, and Loop.

◆ CFInfo() [3/3]

CFInfo::CFInfo ( CFType  t,
llvm::BasicBlock *  bt,
llvm::BasicBlock *  ct,
llvm::Value *  sb,
llvm::Value *  sc,
llvm::Value *  sm,
llvm::Value *  lm 
)
inlineprivate

Definition at line 134 of file ctx.cpp.

References Assert, ForeachActive, ForeachRegular, and ForeachUnique.

Member Function Documentation

◆ GetForeach()

CFInfo * CFInfo::GetForeach ( FunctionEmitContext::ForeachType  ft,
llvm::BasicBlock *  breakTarget,
llvm::BasicBlock *  continueTarget,
llvm::Value *  savedBreakLanesPtr,
llvm::Value *  savedContinueLanesPtr,
llvm::Value *  savedMask,
llvm::Value *  savedBlockEntryMask 
)
static

◆ GetIf()

CFInfo * CFInfo::GetIf ( bool  isUniform,
llvm::Value *  savedMask 
)
static

Returns a new instance of the structure that represents entering an 'if' statement

Definition at line 153 of file ctx.cpp.

References CFInfo(), and If.

Referenced by FunctionEmitContext::StartUniformIf(), and FunctionEmitContext::StartVaryingIf().

◆ GetLoop()

CFInfo * CFInfo::GetLoop ( bool  isUniform,
llvm::BasicBlock *  breakTarget,
llvm::BasicBlock *  continueTarget,
llvm::Value *  savedBreakLanesPtr,
llvm::Value *  savedContinueLanesPtr,
llvm::Value *  savedMask,
llvm::Value *  savedBlockEntryMask 
)
static

Returns a new instance of the structure that represents entering a loop.

Definition at line 155 of file ctx.cpp.

References CFInfo(), and Loop.

Referenced by FunctionEmitContext::StartLoop().

◆ GetSwitch()

CFInfo * CFInfo::GetSwitch ( bool  isUniform,
llvm::BasicBlock *  breakTarget,
llvm::BasicBlock *  continueTarget,
llvm::Value *  savedBreakLanesPtr,
llvm::Value *  savedContinueLanesPtr,
llvm::Value *  savedMask,
llvm::Value *  savedBlockEntryMask,
llvm::Value *  switchExpr,
llvm::BasicBlock *  bbDefault,
const std::vector< std::pair< int, llvm::BasicBlock *>> *  bbCases,
const std::map< llvm::BasicBlock *, llvm::BasicBlock *> *  bbNext,
bool  scUniform 
)
static

Definition at line 185 of file ctx.cpp.

References CFInfo(), and Switch.

Referenced by FunctionEmitContext::StartSwitch().

◆ IsForeach()

bool CFInfo::IsForeach ( )
inline

◆ IsIf()

bool CFInfo::IsIf ( )
inline

Definition at line 82 of file ctx.cpp.

References If, and type.

Referenced by FunctionEmitContext::EndIf(), and FunctionEmitContext::inSwitchStatement().

◆ IsLoop()

bool CFInfo::IsLoop ( )
inline

Definition at line 83 of file ctx.cpp.

References Loop, and type.

Referenced by FunctionEmitContext::EndLoop().

◆ IsSwitch()

bool CFInfo::IsSwitch ( )
inline

Definition at line 85 of file ctx.cpp.

References Switch, and type.

◆ IsUniform()

bool CFInfo::IsUniform ( )
inline

Definition at line 87 of file ctx.cpp.

References isUniform.

Referenced by FunctionEmitContext::EndIf(), and FunctionEmitContext::EndLoop().

◆ IsVarying()

bool CFInfo::IsVarying ( )
inline

Definition at line 86 of file ctx.cpp.

References isUniform.

Referenced by FunctionEmitContext::EndSwitch(), and FunctionEmitContext::VaryingCFDepth().

Member Data Documentation

◆ isUniform

bool CFInfo::isUniform

Definition at line 91 of file ctx.cpp.

Referenced by FunctionEmitContext::ifsInCFAllUniform(), IsUniform(), and IsVarying().

◆ savedBlockEntryMask

llvm::Value * CFInfo::savedBlockEntryMask

Definition at line 94 of file ctx.cpp.

◆ savedBreakLanesPtr

llvm::Value* CFInfo::savedBreakLanesPtr

Definition at line 93 of file ctx.cpp.

◆ savedBreakTarget

llvm::BasicBlock* CFInfo::savedBreakTarget

Definition at line 92 of file ctx.cpp.

Referenced by FunctionEmitContext::popCFState().

◆ savedCaseBlocks

const std::vector<std::pair<int, llvm::BasicBlock *> >* CFInfo::savedCaseBlocks

Definition at line 97 of file ctx.cpp.

◆ savedContinueLanesPtr

llvm::Value * CFInfo::savedContinueLanesPtr

Definition at line 93 of file ctx.cpp.

◆ savedContinueTarget

llvm::BasicBlock * CFInfo::savedContinueTarget

Definition at line 92 of file ctx.cpp.

◆ savedDefaultBlock

llvm::BasicBlock* CFInfo::savedDefaultBlock

Definition at line 96 of file ctx.cpp.

◆ savedMask

llvm::Value* CFInfo::savedMask

◆ savedNextBlocks

const std::map<llvm::BasicBlock *, llvm::BasicBlock *>* CFInfo::savedNextBlocks

Definition at line 98 of file ctx.cpp.

◆ savedSwitchConditionWasUniform

bool CFInfo::savedSwitchConditionWasUniform

Definition at line 99 of file ctx.cpp.

◆ savedSwitchExpr

llvm::Value* CFInfo::savedSwitchExpr

Definition at line 95 of file ctx.cpp.

◆ type

CFType CFInfo::type

The documentation for this struct was generated from the following file: