Intel® Implicit SPMD Program Compiler (Intel® ISPC)
1.13.0
|
Declarations of functions related to builtins and the standard library. More...
#include "ispc.h"
Go to the source code of this file.
Functions | |
void | DefineStdlib (SymbolTable *symbolTable, llvm::LLVMContext *ctx, llvm::Module *module, bool includeStdlib) |
void | AddBitcodeToModule (const BitcodeLib *lib, llvm::Module *module, SymbolTable *symbolTable=NULL, bool warn=true) |
Declarations of functions related to builtins and the standard library.
Definition in file builtins.h.
void AddBitcodeToModule | ( | const BitcodeLib * | lib, |
llvm::Module * | module, | ||
SymbolTable * | symbolTable, | ||
bool | warn | ||
) |
This utility function takes serialized binary LLVM bitcode and adds its definitions to the given module. Functions in the bitcode that can be mapped to ispc functions are also added to the symbol table.
lib | Pointer to BitcodeLib class representing LLVM bitcode (e.g. the contents of a *.bc file) |
module | Module to link the bitcode into |
symbolTable | Symbol table to add definitions to |
Definition at line 746 of file builtins.cpp.
References Assert, Globals::ctx, Debug(), Error(), g, BitcodeLib::getLib(), BitcodeLib::getSize(), lAddModuleSymbols(), lCheckModuleIntrinsics(), lSetInternalFunctions(), m, Module::module, VerifyDataLayoutCompatibility(), and Warning().
Referenced by DefineStdlib(), and lInitDispatchModule().
void DefineStdlib | ( | SymbolTable * | symbolTable, |
llvm::LLVMContext * | ctx, | ||
llvm::Module * | module, | ||
bool | includeStdlib | ||
) |
Adds declarations and definitions of ispc standard library functions and types to the given module.
symbolTable | SymbolTable in which to add symbol definitions for stdlib stuff |
ctx | llvm::LLVMContext to use for getting types and the like for standard library definitions |
module | Module in which to add the declarations/definitions |
includeStdlib | Indicates whether the definitions from the stdlib.ispc file should be added to the module. |
Definition at line 920 of file builtins.cpp.
References AddBitcodeToModule(), Assert, emitLLVMUsed(), Opt::fastMaskedVload, FATAL, Globals::forceAlignment, g, Globals::generateDebuggingSymbols, Target::GENERIC, Target::getArch(), TargetLibRegistry::getBuiltinsCLib(), Target::getISA(), Target::getISPCTarget(), TargetLibRegistry::getISPCTargetLib(), Target::getMaskBitCount(), Target::getVectorWidth(), Target::hasHalf(), Target::hasRand(), Target::hasRcpd(), Target::hasRsqrtd(), Target::hasTranscendentals(), Target::hasTrigonometry(), lDefineConstantInt(), lDefineConstantIntFunc(), lDefineProgramIndex(), LLVMInt32(), Globals::Math_ISPC, Globals::Math_ISPCFast, Globals::Math_SVML, Globals::Math_System, Globals::mathLib, Globals::opt, Globals::target, Globals::target_os, Globals::target_registry, yy_scan_string(), and yyparse().
Referenced by Module::CompileFile().