Intel SPMD Program Compiler  1.11.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Function Class Reference

#include <func.h>

Collaboration diagram for Function:
Collaboration graph
[legend]

Public Member Functions

 Function (Symbol *sym, Stmt *code)
 
const TypeGetReturnType () const
 
const FunctionTypeGetType () const
 
void GenerateIR ()
 

Private Member Functions

void emitCode (FunctionEmitContext *ctx, llvm::Function *function, SourcePos firstStmtPos)
 

Private Attributes

Symbolsym
 
std::vector< Symbol * > args
 
Stmtcode
 
SymbolmaskSymbol
 
SymbolthreadIndexSym
 
SymbolthreadCountSym
 
SymboltaskIndexSym
 
SymboltaskCountSym
 
SymboltaskIndexSym0
 
SymboltaskCountSym0
 
SymboltaskIndexSym1
 
SymboltaskCountSym1
 
SymboltaskIndexSym2
 
SymboltaskCountSym2
 

Detailed Description

Definition at line 44 of file func.h.

Constructor & Destructor Documentation

◆ Function()

Function::Function ( Symbol sym,
Stmt code 
)

Member Function Documentation

◆ emitCode()

void Function::emitCode ( FunctionEmitContext ctx,
llvm::Function *  function,
SourcePos  firstStmtPos 
)
private

Given the statements implementing a function, emit the code that implements the function. Most of the work do be done here just involves wiring up the function parameter values to be available in the function body code.

Definition at line 226 of file func.cpp.

References FunctionEmitContext::AddElementOffset(), FunctionEmitContext::AddInstrumentationPoint(), FunctionEmitContext::All(), FunctionEmitContext::AllocaInst(), args, Assert, FunctionEmitContext::BranchInst(), CHECK_MASK_AT_FUNCTION_START_COST, code, FunctionEmitContext::CreateBasicBlock(), Globals::ctx, Debug(), Opt::disableCoherentControlFlow, Opt::disableMaskAllOnOptimizations, Stmt::EmitCode(), FunctionEmitContext::EmitFunctionParameterDebugInfo(), FunctionEmitContext::EmitVariableDebugInfo(), EstimateCost(), g, FunctionEmitContext::GetCurrentBasicBlock(), FunctionEmitContext::GetFullMaskPointer(), FunctionEmitContext::GetFunctionMask(), Target::getISA(), Target::getMaskingIsFree(), FunctionType::GetReturnType(), FunctionType::GetString(), FunctionEmitContext::InitializeLabelMap(), LLVMTypes::Int32Type, FunctionType::isExported, FunctionType::isTask, FunctionType::isUnmasked, Type::IsVoidType(), lCopyInTaskParameter(), LLVMInt32(), LLVMMaskAllOn, FunctionEmitContext::LoadInst(), m, Target::markFuncWithTargetAttr(), maskSymbol, LLVMTypes::MaskType, Module::module, Symbol::name, Globals::NoOmitFramePointer, Globals::opt, Symbol::pos, ASTNode::pos, FunctionEmitContext::ReturnInst(), FunctionEmitContext::SetCurrentBasicBlock(), FunctionEmitContext::SetDebugPos(), FunctionEmitContext::SetFunctionMask(), Symbol::storagePtr, FunctionEmitContext::StoreInst(), sym, Globals::target, taskCountSym, taskCountSym0, taskCountSym1, taskCountSym2, taskIndexSym, taskIndexSym0, taskIndexSym1, taskIndexSym2, threadCountSym, threadIndexSym, Symbol::type, and Warning().

Referenced by GenerateIR().

◆ GenerateIR()

void Function::GenerateIR ( )

◆ GetReturnType()

const Type * Function::GetReturnType ( ) const

◆ GetType()

const FunctionType * Function::GetType ( ) const

Definition at line 179 of file func.cpp.

References Assert, sym, and Symbol::type.

Member Data Documentation

◆ args

std::vector<Symbol *> Function::args
private

Definition at line 58 of file func.h.

Referenced by emitCode(), and Function().

◆ code

Stmt* Function::code
private

Definition at line 59 of file func.h.

Referenced by emitCode(), Function(), and GenerateIR().

◆ maskSymbol

Symbol* Function::maskSymbol
private

Definition at line 60 of file func.h.

Referenced by emitCode(), and Function().

◆ sym

Symbol* Function::sym
private

Definition at line 57 of file func.h.

Referenced by emitCode(), Function(), GenerateIR(), GetReturnType(), and GetType().

◆ taskCountSym

Symbol * Function::taskCountSym
private

Definition at line 62 of file func.h.

Referenced by emitCode(), and Function().

◆ taskCountSym0

Symbol * Function::taskCountSym0
private

Definition at line 63 of file func.h.

Referenced by emitCode(), and Function().

◆ taskCountSym1

Symbol * Function::taskCountSym1
private

Definition at line 64 of file func.h.

Referenced by emitCode(), and Function().

◆ taskCountSym2

Symbol * Function::taskCountSym2
private

Definition at line 65 of file func.h.

Referenced by emitCode(), and Function().

◆ taskIndexSym

Symbol* Function::taskIndexSym
private

Definition at line 62 of file func.h.

Referenced by emitCode(), and Function().

◆ taskIndexSym0

Symbol* Function::taskIndexSym0
private

Definition at line 63 of file func.h.

Referenced by emitCode(), and Function().

◆ taskIndexSym1

Symbol* Function::taskIndexSym1
private

Definition at line 64 of file func.h.

Referenced by emitCode(), and Function().

◆ taskIndexSym2

Symbol* Function::taskIndexSym2
private

Definition at line 65 of file func.h.

Referenced by emitCode(), and Function().

◆ threadCountSym

Symbol * Function::threadCountSym
private

Definition at line 61 of file func.h.

Referenced by emitCode(), and Function().

◆ threadIndexSym

Symbol* Function::threadIndexSym
private

Definition at line 61 of file func.h.

Referenced by emitCode(), and Function().


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