Intel® Implicit SPMD Program Compiler (Intel® ISPC)
1.13.0
|
This structure collects together a number of global variables. More...
#include <ispc.h>
Public Types | |
enum | MathLib { Math_ISPC, Math_ISPCFast, Math_SVML, Math_System } |
enum | CodegenOptLevel { None, Aggressive } |
Public Member Functions | |
Globals () | |
Public Attributes | |
TargetLibRegistry * | target_registry |
Opt | opt |
Target * | target |
TargetOS | target_os |
MathLib | mathLib |
CodegenOptLevel | codegenOptLevel |
bool | includeStdlib |
bool | runCPP |
bool | debugPrint |
bool | printTarget |
bool | NoOmitFramePointer |
std::set< int > | debug_stages |
bool | dumpFile |
int | debugIR |
std::set< int > | off_stages |
bool | disableWarnings |
bool | warningsAsErrors |
bool | disableLineWrap |
bool | emitPerfWarnings |
bool | quiet |
bool | forceColoredOutput |
bool | emitInstrumentation |
bool | noPragmaOnce |
bool | generateDebuggingSymbols |
int | generateDWARFVersion |
bool | mangleFunctionsWithTarget |
bool | enableFuzzTest |
int | fuzzTestSeed |
llvm::LLVMContext * | ctx |
char | currentDirectory [1024] |
std::vector< std::string > | cppArgs |
std::vector< std::string > | includePath |
int | forceAlignment |
bool | dllExport |
std::map< std::pair< int, std::string >, bool > | turnOffWarnings |
bool | isMultiTargetCompilation |
int | errorLimit |
This structure collects together a number of global variables.
This structure collects a number of global variables that mostly represent parameter settings for this compilation run. In particular, none of these values should change after compilation befins; their values are all set during command-line argument processing or very early during the compiler's execution, before any files are parsed.
enum Globals::MathLib |
Globals::Globals | ( | ) |
Definition at line 1444 of file ispc.cpp.
References Aggressive, FATAL, GetHostOS(), TargetLibRegistry::getTargetLibRegistry(), and Math_ISPC.
CodegenOptLevel Globals::codegenOptLevel |
Definition at line 524 of file ispc.h.
Referenced by main(), and Target::Target().
std::vector<std::string> Globals::cppArgs |
Arguments to pass along to the C pre-processor, if it is run on the program before compilation.
Definition at line 619 of file ispc.h.
Referenced by Module::execPreprocessor(), and main().
llvm::LLVMContext* Globals::ctx |
Global LLVMContext object
Definition at line 611 of file ispc.h.
Referenced by AddBitcodeToModule(), FunctionEmitContext::AddElementOffset(), Module::AddFunctionDeclaration(), Module::AddGlobalVariable(), FunctionEmitContext::addGSMetadata(), FunctionEmitContext::addVaryingOffsetsIfNeeded(), FunctionEmitContext::AllocaInst(), FunctionEmitContext::applyVaryingGEP(), FunctionEmitContext::BroadcastValue(), FunctionEmitContext::CallInst(), Module::CompileFile(), FunctionEmitContext::CreateBasicBlock(), DeclStmt::EmitCode(), ForeachUniqueStmt::EmitCode(), FunctionEmitContext::FunctionEmitContext(), FunctionEmitContext::gather(), Function::GenerateIR(), TypeCastExpr::GetConstant(), AddressOfExpr::GetConstant(), SizeOfExpr::GetConstant(), NullPointerExpr::GetConstant(), VectorType::GetDIType(), StructType::GetDIType(), FunctionEmitContext::GetStringPtr(), SelectExpr::GetValue(), TypeCastExpr::GetValue(), ReferenceExpr::GetValue(), SizeOfExpr::GetValue(), NewExpr::GetValue(), InitSymbol(), lCheckModuleIntrinsics(), lConvertToSlicePointer(), lCreateDispatchFunction(), lDefineConstantIntFunc(), lEmitBinaryPointerArith(), lEmitNegate(), lEmitPrePostIncDec(), lEmitStructDecl(), lEmitVaryingSelect(), lEmitVectorTypedefs(), lFinalSliceOffset(), lGetBasePtrAndOffsets(), lGetConstExprConstant(), lGetExprListConstant(), lGetStringAsValue(), lGetVaryingDispatchType(), lGSToLoadStore(), lInitDispatchModule(), LLVMDouble(), LLVMFloat(), FunctionType::LLVMFunctionType(), LLVMInt16(), LLVMInt32(), LLVMInt64(), LLVMInt8(), PointerType::LLVMType(), LLVMUInt16(), LLVMUInt32(), LLVMUInt64(), LLVMUInt8(), FunctionEmitContext::LoadInst(), FunctionEmitContext::loadUniformFromSOA(), lUniformValueToVarying(), FunctionEmitContext::MakeSlicePointer(), Module::Module(), FunctionEmitContext::ReturnInst(), FunctionEmitContext::StoreInst(), StructType::StructType(), and UndefinedStructType::UndefinedStructType().
char Globals::currentDirectory[1024] |
Current working directory when the ispc compiler starts execution.
Definition at line 615 of file ispc.h.
Referenced by SourcePos::GetDIFile(), GetDirectoryAndFileName(), and Module::Module().
std::set<int> Globals::debug_stages |
Indicates which stages of optimization we want to dump.
Definition at line 545 of file ispc.h.
Referenced by DebugPassManager::add(), and main().
int Globals::debugIR |
bool Globals::debugPrint |
When true
, voluminous debugging output will be printed during ispc's execution.
Definition at line 536 of file ispc.h.
Referenced by Debug(), Module::execPreprocessor(), Function::Function(), lGetBasePtrAndOffsets(), LLVMVectorIsLinear(), LLVMVectorValuesAllEqual(), main(), Optimize(), GatherCoalescePass::runOnBasicBlock(), and Module::writeDeps().
bool Globals::disableLineWrap |
Indicates whether line wrapping of error messages to the terminal width should be disabled.
Definition at line 565 of file ispc.h.
Referenced by main(), and TerminalWidth().
bool Globals::disableWarnings |
bool Globals::dllExport |
When true, flag non-static functions with dllexport attribute on Windows.
Definition at line 630 of file ispc.h.
Referenced by Module::AddFunctionDeclaration(), and main().
bool Globals::dumpFile |
Whether to dump IR to file.
Definition at line 548 of file ispc.h.
Referenced by DebugPassManager::add(), and main().
bool Globals::emitInstrumentation |
Indicates whether calls should be emitted in the program to an externally-defined program instrumentation function. (See the "Instrumenting your ispc programs" section in the user's manual.)
Definition at line 582 of file ispc.h.
Referenced by FunctionEmitContext::AddInstrumentationPoint(), main(), Module::writeDispatchHeader(), and Module::writeHeader().
bool Globals::emitPerfWarnings |
Indicates whether additional warnings should be issued about possible performance pitfalls.
Definition at line 569 of file ispc.h.
Referenced by main(), and PerformanceWarning().
bool Globals::enableFuzzTest |
int Globals::forceAlignment |
Indicates that alignment in memory allocation routines should be forced to have given value. -1 value means natural alignment for the platforms.
Definition at line 627 of file ispc.h.
Referenced by DefineStdlib(), and main().
bool Globals::forceColoredOutput |
Always use ANSI escape sequences to colorize warning and error messages, even if piping output to a file, etc.
Definition at line 576 of file ispc.h.
Referenced by lHaveANSIColors(), and main().
int Globals::fuzzTestSeed |
bool Globals::generateDebuggingSymbols |
Indicates whether ispc should generate debugging symbols for the program in its output.
Definition at line 588 of file ispc.h.
Referenced by DefineStdlib(), main(), Module::Module(), and Module::writeOutput().
int Globals::generateDWARFVersion |
Require generation of DWARF of certain version (2, 3, 4). For default version, this field is set to 0.
Definition at line 596 of file ispc.h.
Referenced by main(), Module::Module(), and Target::Target().
std::vector<std::string> Globals::includePath |
Additional user-provided directories to search when processing #include directives in the preprocessor.
Definition at line 623 of file ispc.h.
Referenced by Module::execPreprocessor(), and lParseInclude().
bool Globals::includeStdlib |
Records whether the ispc standard library should be made available to the program during compilations. (Default is true.)
Definition at line 528 of file ispc.h.
Referenced by Module::CompileFile(), Module::execPreprocessor(), and main().
bool Globals::isMultiTargetCompilation |
Definition at line 636 of file ispc.h.
Referenced by Module::AddGlobalVariable(), and main().
bool Globals::mangleFunctionsWithTarget |
If true, function names are mangled by appending the target ISA and vector width to them.
Definition at line 600 of file ispc.h.
Referenced by Module::AddFunctionDeclaration(), Module::CompileAndOutput(), and Function::GenerateIR().
MathLib Globals::mathLib |
Definition at line 520 of file ispc.h.
Referenced by DefineStdlib(), and main().
bool Globals::NoOmitFramePointer |
When true
, LLVM won't omit frame pointer.
Definition at line 542 of file ispc.h.
Referenced by Module::CompileFile(), Function::emitCode(), and main().
bool Globals::noPragmaOnce |
Definition at line 584 of file ispc.h.
Referenced by main(), Module::writeDispatchHeader(), and Module::writeHeader().
std::set<int> Globals::off_stages |
Indicates which phases of optimization we want to switch off.
Definition at line 555 of file ispc.h.
Referenced by DebugPassManager::add(), and main().
Opt Globals::opt |
Optimization option settings
Definition at line 509 of file ispc.h.
Referenced by FunctionEmitContext::AddElementOffset(), FunctionEmitContext::addVaryingOffsetsIfNeeded(), FunctionEmitContext::applyVaryingGEP(), Module::CompileFile(), DefineStdlib(), Function::emitCode(), DoStmt::EmitCode(), ForStmt::EmitCode(), IfStmt::emitMaskAllOn(), IfStmt::emitVaryingIf(), DoStmt::EstimateCost(), ForStmt::EstimateCost(), Module::execPreprocessor(), FunctionEmitContext::FunctionEmitContext(), BinaryExpr::GetType(), SizeOfExpr::GetType(), NewExpr::GetValue(), lCoalescePerfInfo(), lDeclareSizeAndPtrIntTypes(), lEmitBinaryPointerArith(), lEmitLoads(), lGSToGSBaseOffsets(), lImproveMaskedLoad(), lImproveMaskedStore(), FunctionEmitContext::LoadInst(), lReplacePseudoGS(), lReplacePseudoMaskedStore(), lStoreAssignResult(), main(), Module::Module(), Optimize(), BinaryExpr::Optimize(), PrintEscapedString(), IntrinsicsOpt::runOnBasicBlock(), IsCompileTimeConstantPass::runOnBasicBlock(), ReplaceStdlibShiftPass::runOnBasicBlock(), Target::SizeOf(), FunctionEmitContext::StoreInst(), Target::StructOffset(), Target::Target(), IfStmt::TypeCheck(), DoStmt::TypeCheck(), ForStmt::TypeCheck(), IndexExpr::TypeCheck(), and NewExpr::TypeCheck().
bool Globals::printTarget |
When true
, target ISA will be printed during ispc's execution.
Definition at line 539 of file ispc.h.
Referenced by Module::CompileAndOutput(), and main().
bool Globals::quiet |
bool Globals::runCPP |
Indicates whether the C pre-processor should be run over the program source before compiling it. (Default is true.)
Definition at line 532 of file ispc.h.
Referenced by Module::CompileFile(), and main().
Target* Globals::target |
Compilation target information
Definition at line 512 of file ispc.h.
Referenced by FunctionEmitContext::AddElementOffset(), Module::AddFunctionDeclaration(), FunctionEmitContext::addVaryingOffsetsIfNeeded(), FunctionEmitContext::All(), FunctionEmitContext::AllocaInst(), FunctionEmitContext::Any(), FunctionEmitContext::applyVaryingGEP(), Module::CompileAndOutput(), Module::CompileFile(), ConstExpr::Count(), DefineStdlib(), Function::emitCode(), ForeachStmt::EmitCode(), PrintStmt::EmitCode(), DeleteStmt::EmitCode(), Module::execPreprocessor(), FunctionEmitContext::FunctionEmitContext(), FunctionEmitContext::gather(), Function::GenerateIR(), AtomicType::GetAsUniformType(), DeclSpecs::GetBaseType(), EnumType::GetCDeclaration(), PointerType::GetCDeclaration(), ArrayType::GetCDeclaration(), SizeOfExpr::GetConstant(), AtomicType::GetDIType(), EnumType::GetDIType(), PointerType::GetDIType(), VectorType::GetDIType(), BinaryExpr::GetType(), SizeOfExpr::GetType(), SizeOfExpr::GetValue(), NewExpr::GetValue(), VectorType::getVectorMemoryCount(), FunctionEmitContext::I1VecToBoolVec(), InitLLVMUtil(), InitSymbol(), FunctionEmitContext::LaneMask(), lArrayVectorWidth(), lAssembleResultVectors(), FunctionEmitContext::LaunchInst(), lConvert(), lConvertPointerConstant(), lCreateISPCSymbol(), lDeclareSizeAndPtrIntTypes(), lDefineProgramIndex(), lEmitBinaryPointerArith(), lEmitLoads(), lEmitStructDecl(), lEmitVectorTypedefs(), lExtractConstOffsets(), lGetBasePointer(), lGetBasePtrAndOffsets(), lGetExportedFunctions(), lGetExprListConstant(), lGetMask(), lGetMaskStatus(), lGetMatchingBoolVectorType(), lGetOffsetScaleVec(), lGSBaseOffsetsGetMoreConst(), lGSToGSBaseOffsets(), lGSToLoadStore(), lImproveMaskedLoad(), lImproveMaskedStore(), lInitDispatchModule(), lIsExactMultiple(), lIsSafeToBlend(), LLVMBoolVector(), LLVMBoolVectorInStorage(), LLVMDoubleVector(), LLVMFloatVector(), LLVMInt16Vector(), LLVMInt32Vector(), LLVMInt64Vector(), LLVMInt8Vector(), LLVMUInt16Vector(), LLVMUInt32Vector(), LLVMUInt64Vector(), LLVMUInt8Vector(), lMangleStructName(), FunctionEmitContext::LoadInst(), lReplacePseudoGS(), lTypeConvAtomic(), lUpdateVaryingCounter(), FunctionEmitContext::maskedStore(), FunctionEmitContext::MasksAllEqual(), Module::Module(), FunctionEmitContext::None(), Optimize(), FunctionEmitContext::ProgramIndexVector(), IntrinsicsOpt::runOnBasicBlock(), ReplaceStdlibShiftPass::runOnBasicBlock(), FunctionEmitContext::scatter(), FunctionEmitContext::SmearUniform(), FunctionEmitContext::StoreInst(), FunctionEmitContext::SwitchBoolSize(), BinaryExpr::TypeCheck(), AssignExpr::TypeCheck(), IndexExpr::TypeCheck(), TypeCastExpr::TypeCheck(), NewExpr::TypeCheck(), Module::writeDispatchHeader(), Module::writeObjectFileOrAssembly(), and Module::writeOutput().
TargetOS Globals::target_os |
Target OS
Definition at line 515 of file ispc.h.
Referenced by Module::AddFunctionDeclaration(), DefineStdlib(), Target::GetTripleString(), main(), Module::Module(), and Target::Target().
TargetLibRegistry* Globals::target_registry |
TargetRegistry holding all stdlib bitcode.
Definition at line 506 of file ispc.h.
Referenced by DefineStdlib(), lInitDispatchModule(), main(), ParseOS(), and usage().
std::map<std::pair<int, std::string>, bool> Globals::turnOffWarnings |
Lines for which warnings are turned off.
Definition at line 633 of file ispc.h.
Referenced by PerformanceWarning(), and Warning().
bool Globals::warningsAsErrors |
Indicates whether warnings should be issued as errors.
Definition at line 561 of file ispc.h.
Referenced by ArgErrors::Emit(), main(), PerformanceWarning(), and Warning().