Intel SPMD Program Compiler  1.9.1
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 }
 

Public Member Functions

 Globals ()
 

Public Attributes

Opt opt
 
Targettarget
 
MathLib mathLib
 
bool includeStdlib
 
bool runCPP
 
bool debugPrint
 
bool printTarget
 
bool NoOmitFramePointer
 
std::set< int > debug_stages
 
int debugIR
 
std::set< int > off_stages
 
bool disableWarnings
 
bool warningsAsErrors
 
bool disableLineWrap
 
bool emitPerfWarnings
 
bool quiet
 
bool forceColoredOutput
 
bool emitInstrumentation
 
bool generateDebuggingSymbols
 
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
 

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 537 of file ispc.h.

Member Enumeration Documentation

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 547 of file ispc.h.

Constructor & Destructor Documentation

Globals::Globals ( )

Definition at line 1513 of file ispc.cpp.

References FATAL, and Math_ISPC.

Member Data Documentation

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 640 of file ispc.h.

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

llvm::LLVMContext* Globals::ctx

Global LLVMContext object

Definition at line 632 of file ispc.h.

Referenced by AddBitcodeToModule(), FunctionEmitContext::AddElementOffset(), Module::AddFunctionDeclaration(), Module::AddGlobalVariable(), FunctionEmitContext::addGSMetadata(), FunctionEmitContext::addVaryingOffsetsIfNeeded(), FunctionEmitContext::applyVaryingGEP(), FunctionEmitContext::BroadcastValue(), FunctionEmitContext::CallInst(), Module::CompileFile(), FunctionEmitContext::CreateBasicBlock(), Function::emitCode(), DeclStmt::EmitCode(), ForeachUniqueStmt::EmitCode(), FunctionEmitContext::FunctionEmitContext(), FunctionEmitContext::gather(), Function::GenerateIR(), ExprList::GetConstant(), ConstExpr::GetConstant(), NullPointerExpr::GetConstant(), FunctionEmitContext::GetStringPtr(), SelectExpr::GetValue(), IndexExpr::GetValue(), MemberExpr::GetValue(), TypeCastExpr::GetValue(), ReferenceExpr::GetValue(), SizeOfExpr::GetValue(), NewExpr::GetValue(), VectorMemberExpr::GetValue(), InitSymbol(), FunctionEmitContext::LaunchInst(), lCheckModuleIntrinsics(), lConvertToSlicePointer(), lCreateDispatchFunction(), lDefineConstantIntFunc(), lEmitBinaryPointerArith(), lEmitLogicalOp(), lEmitNegate(), lEmitPrePostIncDec(), lEmitStructDecl(), lEmitVaryingSelect(), lFinalSliceOffset(), lGetStringAsValue(), lGetVaryingDispatchType(), lGSToLoadStore(), lInitDispatchModule(), LLVMDouble(), LLVMFloat(), FunctionType::LLVMFunctionType(), LLVMInt16(), LLVMInt32(), LLVMInt64(), LLVMInt8(), PointerType::LLVMType(), LLVMUInt16(), LLVMUInt32(), LLVMUInt64(), LLVMUInt8(), FunctionEmitContext::loadUniformFromSOA(), lProcessPrintArg(), lStripUnusedDebugInfo(), lUniformValueToVarying(), lUpdateVaryingCounter(), FunctionEmitContext::MakeSlicePointer(), Module::Module(), FunctionEmitContext::ReturnInst(), StructType::StructType(), Target::Target(), and UndefinedStructType::UndefinedStructType().

char Globals::currentDirectory[1024]

Current working directory when the ispc compiler starts execution.

Definition at line 636 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 569 of file ispc.h.

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

int Globals::debugIR

Indicates after which optimization we want to generate DebugIR information.

Definition at line 573 of file ispc.h.

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

bool Globals::debugPrint

When true, voluminous debugging output will be printed during ispc's execution.

Definition at line 560 of file ispc.h.

Referenced by Debug(), Module::execPreprocessor(), Function::Function(), lGetBasePtrAndOffsets(), LLVMVectorIsLinear(), LLVMVectorValuesAllEqual(), main(), Optimize(), and GatherCoalescePass::runOnBasicBlock().

bool Globals::disableLineWrap

Indicates whether line wrapping of error messages to the terminal width should be disabled.

Definition at line 586 of file ispc.h.

Referenced by main(), and TerminalWidth().

bool Globals::disableWarnings

Indicates whether all warning messages should be surpressed.

Definition at line 579 of file ispc.h.

Referenced by main(), and Warning().

bool Globals::dllExport

When true, flag non-static functions with dllexport attribute on Windows.

Definition at line 651 of file ispc.h.

Referenced by Module::AddFunctionDeclaration(), 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 603 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 590 of file ispc.h.

Referenced by main(), and PerformanceWarning().

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 626 of file ispc.h.

Referenced by main().

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 648 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 597 of file ispc.h.

Referenced by lHaveANSIColors(), and main().

int Globals::fuzzTestSeed

Seed for random number generator used for fuzz testing.

Definition at line 629 of file ispc.h.

Referenced by main().

bool Globals::generateDebuggingSymbols

Indicates whether ispc should generate debugging symbols for the program in its output.

Definition at line 607 of file ispc.h.

Referenced by lDefineConstantInt(), lDefineProgramIndex(), lStripUnusedDebugInfo(), main(), Module::Module(), and Module::writeOutput().

std::vector<std::string> Globals::includePath

Additional user-provided directories to search when processing #include directives in the preprocessor.

Definition at line 644 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 552 of file ispc.h.

Referenced by Module::CompileFile(), Module::execPreprocessor(), and main().

bool Globals::mangleFunctionsWithTarget

Require generation of DWARF of certain version (2, 3, 4). For default version, this field is set to 0. If true, function names are mangled by appending the target ISA and vector width to them.

Definition at line 621 of file ispc.h.

Referenced by Module::AddFunctionDeclaration(), Module::CompileAndOutput(), and Function::GenerateIR().

MathLib Globals::mathLib

Definition at line 548 of file ispc.h.

Referenced by DefineStdlib(), and main().

bool Globals::NoOmitFramePointer

When true, LLVM won't omit frame pointer.

Definition at line 566 of file ispc.h.

Referenced by Module::CompileFile(), Function::emitCode(), main(), and Target::Target().

std::set<int> Globals::off_stages

Indicates which phases of optimization we want to switch off.

Definition at line 576 of file ispc.h.

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

Opt Globals::opt
bool Globals::printTarget

When true, target ISA will be printed during ispc's execution.

Definition at line 563 of file ispc.h.

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

bool Globals::quiet

Indicates whether all printed output should be surpressed.

Definition at line 593 of file ispc.h.

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

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 556 of file ispc.h.

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

Target* Globals::target

Compilation target information

Definition at line 543 of file ispc.h.

Referenced by AddBitcodeToModule(), FunctionEmitContext::AddElementOffset(), Module::AddFunctionDeclaration(), Module::AddGlobalVariable(), FunctionEmitContext::addVaryingOffsetsIfNeeded(), FunctionEmitContext::All(), FunctionEmitContext::AllocaInst(), FunctionEmitContext::Any(), FunctionEmitContext::applyVaryingGEP(), Module::CompileAndOutput(), ConstExpr::Count(), DefineStdlib(), Function::emitCode(), DeclStmt::EmitCode(), IfStmt::EmitCode(), ForeachStmt::EmitCode(), ForeachActiveStmt::EmitCode(), ForeachUniqueStmt::EmitCode(), PrintStmt::EmitCode(), DeleteStmt::EmitCode(), Module::execPreprocessor(), Function::Function(), FunctionEmitContext::FunctionEmitContext(), FunctionEmitContext::gather(), Function::GenerateIR(), DeclSpecs::GetBaseType(), EnumType::GetCDeclaration(), PointerType::GetCDeclaration(), ArrayType::GetCDeclaration(), ExprList::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(), lCreateDispatchFunction(), lCreateISPCSymbol(), lDeclareSizeAndPtrIntTypes(), lDefineProgramIndex(), lEmitBinaryPointerArith(), lEmitLoads(), lEmitStructDecl(), lEmitVectorTypedefs(), lExtractConstOffsets(), lGetBasePointer(), lGetBasePtrAndOffsets(), lGetExportedFunctions(), lGetMask(), lGetMaskStatus(), lGetMatchingBoolVectorType(), lGetOffsetScaleVec(), lGSBaseOffsetsGetMoreConst(), lGSToGSBaseOffsets(), lGSToLoadStore(), lImproveMaskedLoad(), lImproveMaskedStore(), lInitDispatchModule(), lIsExactMultiple(), lIsSafeToBlend(), LLVMBoolVector(), LLVMDoubleVector(), LLVMFloatVector(), FunctionType::LLVMFunctionType(), LLVMInt16Vector(), LLVMInt32Vector(), LLVMInt64Vector(), LLVMInt8Vector(), LLVMUInt16Vector(), LLVMUInt32Vector(), LLVMUInt64Vector(), LLVMUInt8Vector(), lMangleStructName(), FunctionEmitContext::LoadInst(), lReplacePseudoGS(), lSetInternalFunctions(), lTypeConvAtomic(), lUpdateVaryingCounter(), FunctionEmitContext::maskedStore(), FunctionEmitContext::MasksAllEqual(), Module::Module(), FunctionEmitContext::None(), Optimize(), FunctionEmitContext::ProgramIndexVector(), IntrinsicsOpt::runOnBasicBlock(), ReplaceStdlibShiftPass::runOnBasicBlock(), FixBooleanSelectPass::runOnFunction(), FunctionEmitContext::scatter(), FunctionEmitContext::SmearUniform(), FunctionEmitContext::StoreInst(), FunctionEmitContext::SyncInst(), BinaryExpr::TypeCheck(), AssignExpr::TypeCheck(), IndexExpr::TypeCheck(), TypeCastExpr::TypeCheck(), SizeOfExpr::TypeCheck(), NewExpr::TypeCheck(), Module::writeBitcode(), Module::writeDispatchHeader(), Module::writeObjectFileOrAssembly(), and Module::writeOutput().

bool Globals::warningsAsErrors

Indicates whether warnings should be issued as errors.

Definition at line 582 of file ispc.h.

Referenced by main(), and Warning().


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