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

ispc global definitions More...

#include "ispc.h"
#include "llvmutil.h"
#include "module.h"
#include "util.h"
#include <sstream>
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <llvm/CodeGen/TargetLowering.h>
#include <llvm/CodeGen/TargetSubtargetInfo.h>
#include <llvm/IR/DIBuilder.h>
#include <llvm/IR/DebugInfo.h>
#include <llvm/IR/Instructions.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/BinaryFormat/Dwarf.h>
#include <llvm/IR/Attributes.h>
#include <llvm/IR/DataLayout.h>
#include <llvm/Support/CodeGen.h>
#include <llvm/Support/Host.h>
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Target/TargetMachine.h>
#include <llvm/Target/TargetOptions.h>
Include dependency graph for ispc.cpp:

Go to the source code of this file.

Classes

class  AllCPUs
 

Enumerations

enum  CPUtype {
  CPU_None = 0, CPU_Generic = 1, CPU_x86_64, CPU_Bonnell,
  CPU_Core2, CPU_Penryn, CPU_Nehalem, CPU_PS4,
  CPU_SandyBridge, CPU_IvyBridge, CPU_Haswell, CPU_Broadwell,
  CPU_KNL, CPU_SKX, CPU_Silvermont, sizeofCPUtype
}
 

Functions

static void __cpuid (int info[4], int infoType)
 
static void __cpuidex (int info[4], int level, int count)
 
static bool __os_has_avx_support ()
 
static bool __os_has_avx512_support ()
 
static ISPCTarget lGetSystemISA ()
 
static const bool lIsTargetValidforArch (ISPCTarget target, Arch arch)
 
static bool lGenericTypeLayoutIndeterminate (llvm::Type *type)
 
SourcePos Union (const SourcePos &p1, const SourcePos &p2)
 

Variables

Globalsg
 
Modulem
 

Detailed Description

ispc global definitions

Definition in file ispc.cpp.

Enumeration Type Documentation

◆ CPUtype

enum CPUtype
Enumerator
CPU_None 
CPU_Generic 
CPU_x86_64 
CPU_Bonnell 
CPU_Core2 
CPU_Penryn 
CPU_Nehalem 
CPU_PS4 
CPU_SandyBridge 
CPU_IvyBridge 
CPU_Haswell 
CPU_Broadwell 
CPU_KNL 
CPU_SKX 
CPU_Silvermont 
sizeofCPUtype 

Definition at line 200 of file ispc.cpp.

Function Documentation

◆ __cpuid()

static void __cpuid ( int  info[4],
int  infoType 
)
static

Definition at line 81 of file ispc.cpp.

Referenced by lGetSystemISA().

◆ __cpuidex()

static void __cpuidex ( int  info[4],
int  level,
int  count 
)
static

Definition at line 86 of file ispc.cpp.

Referenced by lGetSystemISA().

◆ __os_has_avx512_support()

static bool __os_has_avx512_support ( )
static

Definition at line 111 of file ispc.cpp.

Referenced by lGetSystemISA().

◆ __os_has_avx_support()

static bool __os_has_avx_support ( )
static

Definition at line 96 of file ispc.cpp.

Referenced by lGetSystemISA().

◆ lGenericTypeLayoutIndeterminate()

static bool lGenericTypeLayoutIndeterminate ( llvm::Type *  type)
static

◆ lGetSystemISA()

static ISPCTarget lGetSystemISA ( )
static

◆ lIsTargetValidforArch()

static const bool lIsTargetValidforArch ( ISPCTarget  target,
Arch  arch 
)
static

Definition at line 183 of file ispc.cpp.

References aarch64, arm, ISPCTargetIsX86(), neon_i16x8, neon_i32x4, neon_i32x8, neon_i8x16, x86, and x86_64.

Referenced by Target::Target().

◆ 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().