Intel SPMD Program Compiler  1.9.1
Classes | Macros | Enumerations | Functions | Variables
ispc.cpp File Reference

ispc global definitions More...

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

Go to the source code of this file.

Classes

class  AllCPUs
 

Macros

#define CPU_Silvermont   CPU_Nehalem
 
#define CPU_Broadwell   CPU_Haswell
 

Enumerations

enum  CPUtype {
  CPU_None = 0, CPU_Generic = 1, CPU_Bonnell, CPU_Core2,
  CPU_Penryn, CPU_Nehalem, CPU_SandyBridge, CPU_IvyBridge,
  CPU_Haswell, 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 const char * lGetSystemISA ()
 
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.

Macro Definition Documentation

#define CPU_Broadwell   CPU_Haswell

Referenced by AllCPUs::AllCPUs(), and Target::Target().

#define CPU_Silvermont   CPU_Nehalem

Referenced by AllCPUs::AllCPUs(), and Target::Target().

Enumeration Type Documentation

enum CPUtype
Enumerator
CPU_None 
CPU_Generic 
CPU_Bonnell 
CPU_Core2 
CPU_Penryn 
CPU_Nehalem 
CPU_SandyBridge 
CPU_IvyBridge 
CPU_Haswell 
sizeofCPUtype 

Definition at line 207 of file ispc.cpp.

Function Documentation

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

Definition at line 95 of file ispc.cpp.

Referenced by lGetSystemISA().

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

Definition at line 102 of file ispc.cpp.

Referenced by lGetSystemISA().

static bool __os_has_avx512_support ( )
static

Definition at line 127 of file ispc.cpp.

Referenced by lGetSystemISA().

static bool __os_has_avx_support ( )
static

Definition at line 112 of file ispc.cpp.

Referenced by lGetSystemISA().

static bool lGenericTypeLayoutIndeterminate ( llvm::Type *  type)
static
static const char* lGetSystemISA ( )
static

Definition at line 145 of file ispc.cpp.

References __cpuid(), __cpuidex(), __os_has_avx512_support(), __os_has_avx_support(), and Error().

Referenced by Target::Target().

SourcePos Union ( const SourcePos p1,
const SourcePos p2 
)

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

Definition at line 1605 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

Globals* g

Definition at line 88 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(), Function::emitCode(), DeclStmt::EmitCode(), IfStmt::EmitCode(), DoStmt::EmitCode(), ForStmt::EmitCode(), ForeachStmt::EmitCode(), ForeachActiveStmt::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(), DeclSpecs::GetBaseType(), EnumType::GetCDeclaration(), PointerType::GetCDeclaration(), ArrayType::GetCDeclaration(), ExprList::GetConstant(), ConstExpr::GetConstant(), NullPointerExpr::GetConstant(), GetDirectoryAndFileName(), AtomicType::GetDIType(), EnumType::GetDIType(), PointerType::GetDIType(), VectorType::GetDIType(), FunctionEmitContext::GetStringPtr(), BinaryExpr::GetType(), SizeOfExpr::GetType(), SelectExpr::GetValue(), IndexExpr::GetValue(), MemberExpr::GetValue(), TypeCastExpr::GetValue(), ReferenceExpr::GetValue(), SizeOfExpr::GetValue(), NewExpr::GetValue(), VectorMemberExpr::GetValue(), VectorType::getVectorMemoryCount(), FunctionEmitContext::I1VecToBoolVec(), InitLLVMUtil(), InitSymbol(), FunctionEmitContext::LaneMask(), lArrayVectorWidth(), lAssembleResultVectors(), FunctionEmitContext::LaunchInst(), lCheckModuleIntrinsics(), lConvert(), lConvertPointerConstant(), lConvertToSlicePointer(), lCreateDispatchFunction(), lCreateISPCSymbol(), lDeclareSizeAndPtrIntTypes(), lDefineConstantInt(), lDefineConstantIntFunc(), lDefineProgramIndex(), lEmitBinaryPointerArith(), lEmitLoads(), lEmitLogicalOp(), lEmitNegate(), lEmitPrePostIncDec(), lEmitStructDecl(), lEmitVaryingSelect(), lEmitVectorTypedefs(), lExtractConstOffsets(), lFinalSliceOffset(), lGetBasePointer(), lGetBasePtrAndOffsets(), lGetExportedFunctions(), lGetMask(), lGetMaskStatus(), lGetMatchingBoolVectorType(), lGetOffsetScaleVec(), lGetStringAsValue(), lGetVaryingDispatchType(), lGSBaseOffsetsGetMoreConst(), lGSToGSBaseOffsets(), lGSToLoadStore(), lHaveANSIColors(), lImproveMaskedLoad(), lImproveMaskedStore(), lInitDispatchModule(), lIsExactMultiple(), lIsSafeToBlend(), LLVMBoolVector(), 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(), lProcessPrintArg(), lReplacePseudoGS(), lReplacePseudoMaskedStore(), lSetInternalFunctions(), lStoreAssignResult(), lStripUnusedDebugInfo(), lTypeConvAtomic(), lUniformValueToVarying(), lUpdateVaryingCounter(), main(), FunctionEmitContext::MakeSlicePointer(), FunctionEmitContext::maskedStore(), FunctionEmitContext::MasksAllEqual(), Module::Module(), FunctionEmitContext::None(), BinaryExpr::Optimize(), Optimize(), PerformanceWarning(), FunctionEmitContext::ProgramIndexVector(), FunctionEmitContext::ReturnInst(), IntrinsicsOpt::runOnBasicBlock(), GatherCoalescePass::runOnBasicBlock(), IsCompileTimeConstantPass::runOnBasicBlock(), ReplaceStdlibShiftPass::runOnBasicBlock(), FixBooleanSelectPass::runOnFunction(), FunctionEmitContext::scatter(), FunctionEmitContext::SmearUniform(), FunctionEmitContext::StoreInst(), StructType::StructType(), FunctionEmitContext::SyncInst(), TerminalWidth(), IfStmt::TypeCheck(), BinaryExpr::TypeCheck(), DoStmt::TypeCheck(), ForStmt::TypeCheck(), AssignExpr::TypeCheck(), IndexExpr::TypeCheck(), TypeCastExpr::TypeCheck(), SizeOfExpr::TypeCheck(), NewExpr::TypeCheck(), UndefinedStructType::UndefinedStructType(), Warning(), Module::writeBitcode(), Module::writeDispatchHeader(), Module::writeHeader(), Module::writeObjectFileOrAssembly(), and Module::writeOutput().

Module* m

Definition at line 89 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(), Function::emitCode(), 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(), ArrayType::GetAsVaryingType(), ReferenceType::GetAsVaryingType(), ReferenceType::GetBaseType(), AtomicType::GetCDeclaration(), EnumType::GetCDeclaration(), PointerType::GetCDeclaration(), ArrayType::GetCDeclaration(), ReferenceType::GetCDeclaration(), ExprList::GetConstant(), ConstExpr::GetConstant(), 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(), 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(), lGetStringAsValue(), lGSBaseOffsetsGetMoreConst(), lGSToGSBaseOffsets(), lGSToLoadStore(), lImproveMaskedLoad(), lImproveMaskedStore(), FunctionType::LLVMFunctionType(), PointerType::LLVMType(), ArrayType::LLVMType(), VectorType::LLVMType(), StructType::LLVMType(), UndefinedStructType::LLVMType(), ReferenceType::LLVMType(), FunctionEmitContext::LoadInst(), lReplacePseudoGS(), lReplacePseudoMaskedStore(), lStripUnusedDebugInfo(), lUpdateVaryingCounter(), lVaryingStructHasUniformMember(), PointerType::Mangle(), ArrayType::Mangle(), ReferenceType::Mangle(), FunctionType::Mangle(), FunctionEmitContext::maskedStore(), FunctionEmitContext::MemcpyInst(), FunctionEmitContext::None(), FunctionEmitContext::NotOperator(), BinaryExpr::Optimize(), 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::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().