Intel SPMD Program Compiler  1.9.2
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 73 of file ctx.cpp.

Member Enumeration Documentation

Enumerator
If 
Loop 
ForeachRegular 
ForeachActive 
ForeachUnique 
Switch 

Definition at line 113 of file ctx.cpp.

Constructor & Destructor Documentation

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

Definition at line 127 of file ctx.cpp.

References Assert, and If.

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

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 139 of file ctx.cpp.

References Assert, Loop, and Switch.

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 160 of file ctx.cpp.

References Assert, ForeachActive, ForeachRegular, and ForeachUnique.

Member Function Documentation

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
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 181 of file ctx.cpp.

References CFInfo(), and If.

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

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 187 of file ctx.cpp.

References CFInfo(), and Loop.

Referenced by FunctionEmitContext::StartLoop().

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 228 of file ctx.cpp.

References CFInfo(), and Switch.

Referenced by FunctionEmitContext::StartSwitch().

bool CFInfo::IsForeach ( )
inline
bool CFInfo::IsIf ( )
inline

Definition at line 104 of file ctx.cpp.

References If, and type.

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

bool CFInfo::IsLoop ( )
inline

Definition at line 105 of file ctx.cpp.

References Loop, and type.

Referenced by FunctionEmitContext::EndLoop().

bool CFInfo::IsSwitch ( )
inline

Definition at line 109 of file ctx.cpp.

References Switch, and type.

bool CFInfo::IsUniform ( )
inline

Definition at line 111 of file ctx.cpp.

References isUniform.

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

bool CFInfo::IsVarying ( )
inline

Definition at line 110 of file ctx.cpp.

References isUniform.

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

Member Data Documentation

bool CFInfo::isUniform

Definition at line 116 of file ctx.cpp.

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

llvm::Value * CFInfo::savedBlockEntryMask

Definition at line 119 of file ctx.cpp.

llvm::Value* CFInfo::savedBreakLanesPtr

Definition at line 118 of file ctx.cpp.

llvm::BasicBlock* CFInfo::savedBreakTarget

Definition at line 117 of file ctx.cpp.

Referenced by FunctionEmitContext::popCFState().

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

Definition at line 122 of file ctx.cpp.

llvm::Value * CFInfo::savedContinueLanesPtr

Definition at line 118 of file ctx.cpp.

llvm::BasicBlock * CFInfo::savedContinueTarget

Definition at line 117 of file ctx.cpp.

llvm::BasicBlock* CFInfo::savedDefaultBlock

Definition at line 121 of file ctx.cpp.

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

Definition at line 123 of file ctx.cpp.

bool CFInfo::savedSwitchConditionWasUniform

Definition at line 124 of file ctx.cpp.

llvm::Value* CFInfo::savedSwitchExpr

Definition at line 120 of file ctx.cpp.

CFType CFInfo::type

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