Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Public Types | Public Member Functions | Public Attributes | List of all members
Globals Struct Reference

This structure collects together a number of global variables. More...

#include <ispc.h>

Collaboration diagram for Globals:
Collaboration graph
[legend]

Public Types

enum  MathLib { Math_ISPC, Math_ISPCFast, Math_SVML, Math_System }
 
enum  CodegenOptLevel { None, Aggressive }
 

Public Member Functions

 Globals ()
 

Public Attributes

TargetLibRegistrytarget_registry
 
Opt opt
 
Targettarget
 
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
 

Detailed Description

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.

Definition at line 502 of file ispc.h.

Member Enumeration Documentation

◆ CodegenOptLevel

Optimization level to be specified while creating TargetMachine.

Enumerator
None 
Aggressive 

Definition at line 523 of file ispc.h.

◆ MathLib

There are a number of math libraries that can be used for transcendentals and the like during program compilation.

Enumerator
Math_ISPC 
Math_ISPCFast 
Math_SVML 
Math_System 

Definition at line 519 of file ispc.h.

Constructor & Destructor Documentation

◆ Globals()

Globals::Globals ( )

Member Data Documentation

◆ codegenOptLevel

CodegenOptLevel Globals::codegenOptLevel

Definition at line 524 of file ispc.h.

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

◆ cppArgs

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

◆ ctx

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

◆ currentDirectory

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

◆ debug_stages

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

◆ debugIR

int Globals::debugIR

Indicates after which optimization we want to generate DebugIR information.

Definition at line 552 of file ispc.h.

◆ debugPrint

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

◆ disableLineWrap

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

◆ disableWarnings

bool Globals::disableWarnings

Indicates whether all warning messages should be surpressed.

Definition at line 558 of file ispc.h.

Referenced by main(), and Warning().

◆ dllExport

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

◆ dumpFile

bool Globals::dumpFile

Whether to dump IR to file.

Definition at line 548 of file ispc.h.

Referenced by DebugPassManager::add(), and main().

◆ emitInstrumentation

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

◆ emitPerfWarnings

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

◆ enableFuzzTest

bool Globals::enableFuzzTest

If enabled, the lexer will randomly replace some tokens returned with other tokens, in order to test error condition handling in the compiler.

Definition at line 605 of file ispc.h.

Referenced by main().

◆ errorLimit

int Globals::errorLimit

Definition at line 639 of file ispc.h.

Referenced by Error(), and main().

◆ forceAlignment

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

◆ forceColoredOutput

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

◆ fuzzTestSeed

int Globals::fuzzTestSeed

Seed for random number generator used for fuzz testing.

Definition at line 608 of file ispc.h.

Referenced by main().

◆ generateDebuggingSymbols

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

◆ generateDWARFVersion

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

◆ includePath

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

◆ includeStdlib

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

◆ isMultiTargetCompilation

bool Globals::isMultiTargetCompilation

Definition at line 636 of file ispc.h.

Referenced by Module::AddGlobalVariable(), and main().

◆ mangleFunctionsWithTarget

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

MathLib Globals::mathLib

Definition at line 520 of file ispc.h.

Referenced by DefineStdlib(), and main().

◆ NoOmitFramePointer

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

◆ noPragmaOnce

bool Globals::noPragmaOnce

Definition at line 584 of file ispc.h.

Referenced by main(), Module::writeDispatchHeader(), and Module::writeHeader().

◆ off_stages

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

Opt Globals::opt

◆ printTarget

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

◆ quiet

bool Globals::quiet

Indicates whether all printed output should be surpressed.

Definition at line 572 of file ispc.h.

Referenced by Debug(), Error(), main(), PerformanceWarning(), and Warning().

◆ runCPP

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

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

◆ target_os

TargetOS Globals::target_os

◆ target_registry

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

◆ turnOffWarnings

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

◆ warningsAsErrors

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


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