Intel® Implicit SPMD Program Compiler (Intel® ISPC)
1.13.0
|
main() entrypoint implementation for ispc More...
#include "ispc.h"
#include "module.h"
#include "target_registry.h"
#include "type.h"
#include "util.h"
#include <cstdarg>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <llvm/Support/CommandLine.h>
#include <llvm/Support/Debug.h>
#include <llvm/Support/Signals.h>
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Support/TargetSelect.h>
Go to the source code of this file.
Classes | |
class | ArgFactory |
class | FileArgFactory |
class | StringArgFactory |
class | ArgErrors |
Functions | |
static void | lPrintVersion () |
static void | usage (int ret) |
static void | devUsage (int ret) |
static void | lAddSingleArg (char *arg, std::vector< char *> &argv) |
static void | lAddArgsFromFactory (ArgFactory &Args, std::vector< char *> &argv) |
static void | lAddArgsFromFile (FILE *file, std::vector< char *> &argv) |
static void | lAddArgsFromString (const char *string, std::vector< char *> &argv) |
static void | lGetAllArgs (int Argc, char *Argv[], std::vector< char *> &argv) |
static void | lSignal (void *) |
static int | ParsingPhaseName (char *stage, ArgErrors &errorHandler) |
static std::set< int > | ParsingPhases (char *stages, ArgErrors &errorHandler) |
static void | lParseInclude (const char *path) |
int | main (int Argc, char *Argv[]) |
|
static |
|
static |
Add all args from a given factory to the argv passed as parameters, which could include recursing into another ArgFactory.
Definition at line 308 of file main.cpp.
References ArgFactory::GetNextArg(), and lAddSingleArg().
Referenced by lAddArgsFromFile(), and lAddArgsFromString().
|
static |
Parse an open file for arguments and add them to the argv passed as parameters
Definition at line 318 of file main.cpp.
References lAddArgsFromFactory().
Referenced by lAddSingleArg().
|
static |
Parse a string for arguments and add them to the argv passed as parameters
Definition at line 324 of file main.cpp.
References lAddArgsFromFactory().
Referenced by lGetAllArgs().
|
static |
Add a single argument to the argv passed as parameters. If the argument is of the form <filename> and <filename> exists and is readable, the arguments in the file will be inserted into argv in place of the original argument.
Definition at line 333 of file main.cpp.
References lAddArgsFromFile().
Referenced by lAddArgsFromFactory(), lGetAllArgs(), and StringArgFactory::StringArgFactory().
|
static |
We take arguments from both the command line as well as from the ISPC_ARGS environment variable - and each of these can include a file containing additional arguments using <filename>. This function returns a new set of arguments representing the ones from all these sources merged together.
Definition at line 353 of file main.cpp.
References lAddArgsFromString(), and lAddSingleArg().
Referenced by main().
|
static |
Definition at line 460 of file main.cpp.
References g, and Globals::includePath.
Referenced by main().
|
static |
Definition at line 70 of file main.cpp.
References ISPC_LLVM_VERSION_STRING, and ISPC_VERSION.
Referenced by devUsage(), main(), and usage().
|
static |
int main | ( | int | Argc, |
char * | Argv[] | ||
) |
Definition at line 482 of file main.cpp.
References ArgErrors::AddError(), ArgErrors::AddWarning(), ArchToString(), Module::Asm, Assert, Module::Bitcode, Module::BitcodeText, Globals::codegenOptLevel, Module::CompileAndOutput(), Globals::cppArgs, custom_linux, Module::CXX, Globals::debug_stages, Globals::debugPrint, devUsage(), Opt::disableAsserts, Opt::disableBlendedMaskedStores, Opt::disableCoalescing, Opt::disableCoherentControlFlow, Opt::disableFMA, Opt::disableGatherScatterFlattening, Opt::disableGatherScatterOptimizations, Opt::disableHandlePseudoMemoryOps, Globals::disableLineWrap, Opt::disableMaskAllOnOptimizations, Opt::disableMaskedStoreToStore, Opt::disableUniformControlFlow, Opt::disableUniformMemoryOptimizations, Globals::disableWarnings, Opt::disableZMM, Globals::dllExport, Globals::dumpFile, Globals::emitInstrumentation, Globals::emitPerfWarnings, Globals::enableFuzzTest, error, Error(), Globals::errorLimit, Opt::fastMaskedVload, Opt::fastMath, Opt::force32BitAddressing, Opt::forceAlignedMemory, Globals::forceAlignment, Globals::forceColoredOutput, Globals::fuzzTestSeed, g, Globals::generateDebuggingSymbols, Globals::generateDWARFVersion, Module::GenerateFlatDeps, Module::GenerateMakeRuleForDeps, Module::GeneratePIC, TargetLibRegistry::getSupportedArchs(), TargetLibRegistry::getSupportedOSes(), TargetLibRegistry::getSupportedTargets(), Globals::includeStdlib, Globals::isMultiTargetCompilation, ISPCTargetToString(), Opt::level, lGetAllArgs(), lParseInclude(), lPrintVersion(), lSignal(), Globals::Math_ISPC, Globals::Math_ISPCFast, Globals::Math_SVML, Globals::Math_System, Globals::mathLib, neon_i32x4, Module::NoFlags, none, Globals::NoOmitFramePointer, Globals::noPragmaOnce, Module::Object, Globals::off_stages, Globals::opt, Module::OutputDepsToStdout, ParseArch(), ParseISPCTargets(), ParseOS(), ParsingPhases(), TargetLibRegistry::printSupportMatrix(), Globals::printTarget, ps4, Globals::quiet, Globals::runCPP, Globals::target_os, Globals::target_registry, Opt::unrollLoops, usage(), Warning(), Globals::warningsAsErrors, wasm32, wasm_i32x4, web, windows, and x86_64.
|
static |
Definition at line 415 of file main.cpp.
References ArgErrors::AddError(), and LAST_OPT_NUMBER.
Referenced by ParsingPhases().
|
static |
Definition at line 431 of file main.cpp.
References ArgErrors::AddError(), and ParsingPhaseName().
Referenced by main().
|
static |
Definition at line 90 of file main.cpp.
References g, TargetLibRegistry::getSupportedArchs(), TargetLibRegistry::getSupportedOSes(), TargetLibRegistry::getSupportedTargets(), lPrintVersion(), PrintWithWordBreaks(), Target::SupportedCPUs(), Globals::target_registry, and TerminalWidth().
Referenced by main().