Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Classes | Namespaces | Macros | Enumerations | Functions | Variables
ispc.h File Reference

Main ispc.header file. Defines Target, Globals and Opt classes. More...

#include "ispc_version.h"
#include "target_enums.h"
#include "target_registry.h"
#include <map>
#include <set>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
Include dependency graph for ispc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SourcePos
 Representation of a range of positions in a source file. More...
 
class  Target
 Structure that defines a compilation target. More...
 
struct  Opt
 Structure that collects optimization options. More...
 
struct  Globals
 This structure collects together a number of global variables. More...
 

Namespaces

 llvm
 

Macros

#define ISPC_MAX_NVEC   64
 
#define LAST_OPT_NUMBER   1000
 

Enumerations

enum  StorageClass {
  SC_NONE, SC_EXTERN, SC_STATIC, SC_TYPEDEF,
  SC_EXTERN_C
}
 
enum  {
  COST_ASSIGN = 1, COST_COMPLEX_ARITH_OP = 4, COST_DELETE = 32, COST_DEREF = 4,
  COST_FUNCALL = 4, COST_FUNPTR_UNIFORM = 12, COST_FUNPTR_VARYING = 24, COST_GATHER = 8,
  COST_GOTO = 4, COST_LOAD = 2, COST_NEW = 32, COST_BREAK_CONTINUE = 3,
  COST_RETURN = 4, COST_SELECT = 4, COST_SIMPLE_ARITH_LOGIC_OP = 1, COST_SYNC = 32,
  COST_TASK_LAUNCH = 32, COST_TYPECAST_COMPLEX = 4, COST_TYPECAST_SIMPLE = 1, COST_UNIFORM_IF = 2,
  COST_VARYING_IF = 3, COST_UNIFORM_LOOP = 4, COST_VARYING_LOOP = 6, COST_UNIFORM_SWITCH = 4,
  COST_VARYING_SWITCH = 12, COST_ASSERT = 8, CHECK_MASK_AT_FUNCTION_START_COST = 16, PREDICATE_SAFE_IF_STATEMENT_COST = 6
}
 

Functions

SourcePos Union (const SourcePos &p1, const SourcePos &p2)
 

Variables

Globalsg
 
Modulem
 

Detailed Description

Main ispc.header file. Defines Target, Globals and Opt classes.

Definition in file ispc.h.

Macro Definition Documentation

◆ ISPC_MAX_NVEC

#define ISPC_MAX_NVEC   64

◆ LAST_OPT_NUMBER

#define LAST_OPT_NUMBER   1000

Definition at line 72 of file ispc.h.

Referenced by Optimize(), and ParsingPhaseName().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
COST_ASSIGN 
COST_COMPLEX_ARITH_OP 
COST_DELETE 
COST_DEREF 
COST_FUNCALL 
COST_FUNPTR_UNIFORM 
COST_FUNPTR_VARYING 
COST_GATHER 
COST_GOTO 
COST_LOAD 
COST_NEW 
COST_BREAK_CONTINUE 
COST_RETURN 
COST_SELECT 
COST_SIMPLE_ARITH_LOGIC_OP 
COST_SYNC 
COST_TASK_LAUNCH 
COST_TYPECAST_COMPLEX 
COST_TYPECAST_SIMPLE 
COST_UNIFORM_IF 
COST_VARYING_IF 
COST_UNIFORM_LOOP 
COST_VARYING_LOOP 
COST_UNIFORM_SWITCH 
COST_VARYING_SWITCH 
COST_ASSERT 
CHECK_MASK_AT_FUNCTION_START_COST 
PREDICATE_SAFE_IF_STATEMENT_COST 

Definition at line 642 of file ispc.h.

◆ StorageClass

Enumerator
SC_NONE 
SC_EXTERN 
SC_STATIC 
SC_TYPEDEF 
SC_EXTERN_C 

Definition at line 114 of file ispc.h.

Function Documentation

◆ Union()

SourcePos Union ( const SourcePos p1,
const SourcePos p2 
)

Returns a SourcePos that encompasses the extent of both of the given extents.

Definition at line 1523 of file ispc.cpp.

References SourcePos::first_column, SourcePos::first_line, SourcePos::last_column, SourcePos::last_line, and SourcePos::name.

Referenced by SelectExpr::GetType(), ArrayType::SizeUnsizedArrays(), BinaryExpr::TypeCheck(), and SelectExpr::TypeCheck().

Variable Documentation

◆ g

Globals* g

Definition at line 72 of file ispc.cpp.

Referenced by DebugPassManager::add(), AddBitcodeToModule(), FunctionEmitContext::AddElementOffset(), Module::AddFunctionDeclaration(), Module::AddGlobalVariable(), FunctionEmitContext::addGSMetadata(), FunctionEmitContext::AddInstrumentationPoint(), FunctionEmitContext::addVaryingOffsetsIfNeeded(), FunctionEmitContext::All(), FunctionEmitContext::AllocaInst(), FunctionEmitContext::Any(), FunctionEmitContext::applyVaryingGEP(), FunctionEmitContext::BroadcastValue(), FunctionEmitContext::CallInst(), Module::CompileAndOutput(), Module::CompileFile(), ConstExpr::Count(), FunctionEmitContext::CreateBasicBlock(), Debug(), DefineStdlib(), ArgErrors::Emit(), Function::emitCode(), DeclStmt::EmitCode(), DoStmt::EmitCode(), ForStmt::EmitCode(), ForeachStmt::EmitCode(), ForeachUniqueStmt::EmitCode(), PrintStmt::EmitCode(), DeleteStmt::EmitCode(), IfStmt::emitMaskAllOn(), IfStmt::emitVaryingIf(), Error(), DoStmt::EstimateCost(), ForStmt::EstimateCost(), Module::execPreprocessor(), Function::Function(), FunctionEmitContext::FunctionEmitContext(), FunctionEmitContext::gather(), Function::GenerateIR(), AtomicType::GetAsUniformType(), DeclSpecs::GetBaseType(), EnumType::GetCDeclaration(), PointerType::GetCDeclaration(), ArrayType::GetCDeclaration(), TypeCastExpr::GetConstant(), AddressOfExpr::GetConstant(), SizeOfExpr::GetConstant(), NullPointerExpr::GetConstant(), GetDirectoryAndFileName(), AtomicType::GetDIType(), EnumType::GetDIType(), PointerType::GetDIType(), VectorType::GetDIType(), StructType::GetDIType(), FunctionEmitContext::GetStringPtr(), BinaryExpr::GetType(), SizeOfExpr::GetType(), SelectExpr::GetValue(), TypeCastExpr::GetValue(), ReferenceExpr::GetValue(), SizeOfExpr::GetValue(), NewExpr::GetValue(), VectorType::getVectorMemoryCount(), FunctionEmitContext::I1VecToBoolVec(), InitLLVMUtil(), InitSymbol(), FunctionEmitContext::LaneMask(), lArrayVectorWidth(), lAssembleResultVectors(), FunctionEmitContext::LaunchInst(), lCheckModuleIntrinsics(), lCoalescePerfInfo(), lConvert(), lConvertPointerConstant(), lConvertToSlicePointer(), lCreateDispatchFunction(), lCreateISPCSymbol(), lDeclareSizeAndPtrIntTypes(), lDefineConstantIntFunc(), lDefineProgramIndex(), lEmitBinaryPointerArith(), lEmitLoads(), lEmitNegate(), lEmitPrePostIncDec(), lEmitStructDecl(), lEmitVaryingSelect(), lEmitVectorTypedefs(), lExtractConstOffsets(), lFinalSliceOffset(), lGetBasePointer(), lGetBasePtrAndOffsets(), lGetConstExprConstant(), lGetExportedFunctions(), lGetExprListConstant(), lGetMask(), lGetMaskStatus(), lGetMatchingBoolVectorType(), lGetOffsetScaleVec(), lGetStringAsValue(), lGetVaryingDispatchType(), lGSBaseOffsetsGetMoreConst(), lGSToGSBaseOffsets(), lGSToLoadStore(), lHaveANSIColors(), lImproveMaskedLoad(), lImproveMaskedStore(), lInitDispatchModule(), lIsExactMultiple(), lIsSafeToBlend(), LLVMBoolVector(), LLVMBoolVectorInStorage(), LLVMDouble(), LLVMDoubleVector(), LLVMFloat(), LLVMFloatVector(), FunctionType::LLVMFunctionType(), LLVMInt16(), LLVMInt16Vector(), LLVMInt32(), LLVMInt32Vector(), LLVMInt64(), LLVMInt64Vector(), LLVMInt8(), LLVMInt8Vector(), PointerType::LLVMType(), LLVMUInt16(), LLVMUInt16Vector(), LLVMUInt32(), LLVMUInt32Vector(), LLVMUInt64(), LLVMUInt64Vector(), LLVMUInt8(), LLVMUInt8Vector(), LLVMVectorIsLinear(), LLVMVectorValuesAllEqual(), lMangleStructName(), FunctionEmitContext::LoadInst(), FunctionEmitContext::loadUniformFromSOA(), lParseInclude(), lReplacePseudoGS(), lReplacePseudoMaskedStore(), lStoreAssignResult(), lTypeConvAtomic(), lUniformValueToVarying(), lUpdateVaryingCounter(), main(), FunctionEmitContext::MakeSlicePointer(), FunctionEmitContext::maskedStore(), FunctionEmitContext::MasksAllEqual(), Module::Module(), FunctionEmitContext::None(), Optimize(), BinaryExpr::Optimize(), ParseOS(), PerformanceWarning(), PrintEscapedString(), FunctionEmitContext::ProgramIndexVector(), FunctionEmitContext::ReturnInst(), IntrinsicsOpt::runOnBasicBlock(), GatherCoalescePass::runOnBasicBlock(), IsCompileTimeConstantPass::runOnBasicBlock(), ReplaceStdlibShiftPass::runOnBasicBlock(), FunctionEmitContext::scatter(), FunctionEmitContext::SmearUniform(), FunctionEmitContext::StoreInst(), StructType::StructType(), FunctionEmitContext::SwitchBoolSize(), TerminalWidth(), IfStmt::TypeCheck(), DoStmt::TypeCheck(), BinaryExpr::TypeCheck(), ForStmt::TypeCheck(), AssignExpr::TypeCheck(), IndexExpr::TypeCheck(), TypeCastExpr::TypeCheck(), NewExpr::TypeCheck(), UndefinedStructType::UndefinedStructType(), usage(), Warning(), Module::writeDeps(), Module::writeDispatchHeader(), Module::writeHeader(), Module::writeObjectFileOrAssembly(), and Module::writeOutput().

◆ m

Module* m

Definition at line 73 of file ispc.cpp.

Referenced by AddBitcodeToModule(), FunctionEmitContext::AddDebugPos(), FunctionEmitContext::AddElementOffset(), Module::AddFunctionDeclaration(), Module::AddFunctionDefinition(), FunctionEmitContext::AddInstrumentationPoint(), FunctionEmitContext::All(), FunctionEmitContext::AllocaInst(), FunctionEmitContext::Any(), FunctionEmitContext::BinaryOperator(), FunctionEmitContext::BitCastInst(), FunctionEmitContext::BranchInst(), FunctionEmitContext::BroadcastValue(), FunctionEmitContext::CallInst(), FunctionEmitContext::CastInst(), FunctionEmitContext::CmpInst(), Module::CompileAndOutput(), Declaration::DeclareFunctions(), DeclSpecs::DeclSpecs(), DeclStmt::EmitCode(), ForeachActiveStmt::EmitCode(), ForeachUniqueStmt::EmitCode(), SwitchStmt::EmitCode(), PrintStmt::EmitCode(), AssertStmt::EmitCode(), DeleteStmt::EmitCode(), FunctionEmitContext::EmitFunctionParameterDebugInfo(), FunctionEmitContext::EmitVariableDebugInfo(), FunctionEmitContext::EndScope(), Error(), PtrDerefExpr::EstimateCost(), FunctionEmitContext::ExtractInst(), ForeachUniqueStmt::ForeachUniqueStmt(), FunctionEmitContext::FPCastInst(), Function::Function(), FunctionEmitContext::FunctionEmitContext(), FunctionEmitContext::gather(), Function::GenerateIR(), ArrayType::GetAsConstType(), ReferenceType::GetAsConstType(), ArrayType::GetAsNonConstType(), ReferenceType::GetAsNonConstType(), ArrayType::GetAsSOAType(), ArrayType::GetAsUnboundVariabilityType(), ReferenceType::GetAsUnboundVariabilityType(), ArrayType::GetAsUniformType(), ReferenceType::GetAsUniformType(), ArrayType::GetAsUnsignedType(), VectorType::GetAsUnsignedType(), ArrayType::GetAsVaryingType(), ReferenceType::GetAsVaryingType(), ReferenceType::GetBaseType(), AtomicType::GetCDeclaration(), EnumType::GetCDeclaration(), PointerType::GetCDeclaration(), ArrayType::GetCDeclaration(), ReferenceType::GetCDeclaration(), AddressOfExpr::GetConstant(), NullPointerExpr::GetConstant(), AtomicType::GetDIType(), EnumType::GetDIType(), PointerType::GetDIType(), ArrayType::GetDIType(), VectorType::GetDIType(), StructType::GetDIType(), UndefinedStructType::GetDIType(), ReferenceType::GetDIType(), FunctionType::GetDIType(), FunctionEmitContext::GetElementPtrInst(), StructType::GetElementType(), IndexExpr::GetLValue(), MemberExpr::GetLValue(), StructMemberExpr::GetLValueType(), VectorMemberExpr::GetLValueType(), DebugPass::getPassName(), DebugPassFile::getPassName(), MakeInternalFuncsStaticPass::getPassName(), PointerType::GetString(), ArrayType::GetString(), ReferenceType::GetString(), FunctionEmitContext::GetStringPtr(), PtrDerefExpr::GetType(), RefDerefExpr::GetType(), AddressOfExpr::GetType(), StructMemberExpr::GetType(), BinaryExpr::GetValue(), AssignExpr::GetValue(), FunctionCallExpr::GetValue(), IndexExpr::GetValue(), MemberExpr::GetValue(), TypeCastExpr::GetValue(), ReferenceExpr::GetValue(), NewExpr::GetValue(), VectorMemberExpr::GetValue(), ReferenceType::GetVariability(), Declaration::GetVariableDeclarations(), FunctionEmitContext::I1VecToBoolVec(), Declarator::InitFromDeclSpecs(), Declarator::InitFromType(), InitSymbol(), FunctionEmitContext::InsertInst(), FunctionEmitContext::IntToPtrInst(), ReferenceType::IsBoolType(), ReferenceType::IsConstType(), ReferenceType::IsFloatType(), ReferenceType::IsIntType(), ReferenceType::IsUnsignedType(), FunctionEmitContext::LaneMask(), FunctionEmitContext::LaunchInst(), lCreateBinaryOperatorCall(), lCreateDIArray(), lDefineConstantInt(), lDefineProgramIndex(), lEmitLogicalOp(), lExtractOrCheckGlobals(), lGetBinaryIntrinsic(), lGetConstExprConstant(), lGetExprListConstant(), lGetStringAsValue(), lGetVectorLLVMType(), lGSBaseOffsetsGetMoreConst(), lGSToGSBaseOffsets(), lGSToLoadStore(), lImproveMaskedLoad(), lImproveMaskedStore(), FunctionType::LLVMFunctionType(), PointerType::LLVMType(), ArrayType::LLVMType(), StructType::LLVMType(), UndefinedStructType::LLVMType(), ReferenceType::LLVMType(), FunctionEmitContext::LoadInst(), lReplacePseudoGS(), lReplacePseudoMaskedStore(), lVaryingStructHasUniformMember(), PointerType::Mangle(), ArrayType::Mangle(), ReferenceType::Mangle(), FunctionType::Mangle(), FunctionEmitContext::maskedStore(), FunctionEmitContext::MasksAllEqual(), FunctionEmitContext::MemcpyInst(), FunctionEmitContext::None(), FunctionEmitContext::NotOperator(), BinaryExpr::Optimize(), PerformanceWarning(), FunctionEmitContext::PtrToIntInst(), PointerType::ResolveUnboundVariability(), ArrayType::ResolveUnboundVariability(), ReferenceType::ResolveUnboundVariability(), FunctionType::ResolveUnboundVariability(), IntrinsicsOpt::runOnBasicBlock(), GatherCoalescePass::runOnBasicBlock(), IsCompileTimeConstantPass::runOnBasicBlock(), ReplaceStdlibShiftPass::runOnBasicBlock(), MakeInternalFuncsStaticPass::runOnModule(), FunctionEmitContext::scatter(), FunctionEmitContext::SelectInst(), FunctionEmitContext::SExtInst(), FunctionEmitContext::ShuffleInst(), InstructionSimplifyPass::simplifyCall(), ArrayType::SizeUnsizedArrays(), FunctionEmitContext::SmearUniform(), FunctionEmitContext::StartScope(), FunctionEmitContext::StoreInst(), StructType::StructType(), FunctionEmitContext::SwitchBoolSize(), FunctionEmitContext::SyncInst(), FunctionEmitContext::TruncInst(), AssignExpr::TypeCheck(), IndexExpr::TypeCheck(), SwitchStmt::TypeCheck(), PtrDerefExpr::TypeCheck(), RefDerefExpr::TypeCheck(), AddressOfExpr::TypeCheck(), NewExpr::TypeCheck(), Warning(), Module::writeDevStub(), Module::writeDispatchHeader(), Module::writeHeader(), Module::writeHostStub(), FunctionEmitContext::ZExtInst(), and FunctionEmitContext::~FunctionEmitContext().