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

Member Enumeration Documentation

Enumerator
If 
Loop 
ForeachRegular 
ForeachActive 
ForeachUnique 
Switch 

Definition at line 109 of file ctx.cpp.

Constructor & Destructor Documentation

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

Definition at line 123 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 135 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 156 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 177 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 183 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 224 of file ctx.cpp.

References CFInfo(), and Switch.

Referenced by FunctionEmitContext::StartSwitch().

bool CFInfo::IsForeach ( )
inline

Definition at line 102 of file ctx.cpp.

References ForeachActive, ForeachRegular, ForeachUnique, and type.

Referenced by FunctionEmitContext::EndForeach().

bool CFInfo::IsIf ( )
inline

Definition at line 100 of file ctx.cpp.

References If, and type.

Referenced by FunctionEmitContext::EndIf().

bool CFInfo::IsLoop ( )
inline

Definition at line 101 of file ctx.cpp.

References Loop, and type.

Referenced by FunctionEmitContext::EndLoop().

bool CFInfo::IsSwitch ( )
inline

Definition at line 105 of file ctx.cpp.

References Switch, and type.

bool CFInfo::IsUniform ( )
inline

Definition at line 107 of file ctx.cpp.

References isUniform.

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

bool CFInfo::IsVarying ( )
inline

Definition at line 106 of file ctx.cpp.

References isUniform.

Referenced by FunctionEmitContext::EndSwitch().

Member Data Documentation

bool CFInfo::isUniform

Definition at line 112 of file ctx.cpp.

Referenced by IsUniform(), and IsVarying().

llvm::Value * CFInfo::savedBlockEntryMask

Definition at line 115 of file ctx.cpp.

llvm::Value* CFInfo::savedBreakLanesPtr

Definition at line 114 of file ctx.cpp.

llvm::BasicBlock* CFInfo::savedBreakTarget

Definition at line 113 of file ctx.cpp.

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

Definition at line 118 of file ctx.cpp.

llvm::Value * CFInfo::savedContinueLanesPtr

Definition at line 114 of file ctx.cpp.

llvm::BasicBlock * CFInfo::savedContinueTarget

Definition at line 113 of file ctx.cpp.

llvm::BasicBlock* CFInfo::savedDefaultBlock

Definition at line 117 of file ctx.cpp.

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

Definition at line 119 of file ctx.cpp.

bool CFInfo::savedSwitchConditionWasUniform

Definition at line 120 of file ctx.cpp.

llvm::Value* CFInfo::savedSwitchExpr

Definition at line 116 of file ctx.cpp.

CFType CFInfo::type

Definition at line 111 of file ctx.cpp.

Referenced by IsForeach(), IsIf(), IsLoop(), and IsSwitch().


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