Intel SPMD Program Compiler  1.9.1
Functions
builtins.h File Reference

Declarations of functions related to builtins and the standard library. More...

#include "ispc.h"
Include dependency graph for builtins.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void DefineStdlib (SymbolTable *symbolTable, llvm::LLVMContext *ctx, llvm::Module *module, bool includeStdlib)
 
void AddBitcodeToModule (const unsigned char *bitcode, int length, llvm::Module *module, SymbolTable *symbolTable=NULL, bool warn=true)
 

Detailed Description

Declarations of functions related to builtins and the standard library.

Definition in file builtins.h.

Function Documentation

void AddBitcodeToModule ( const unsigned char *  bitcode,
int  length,
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.

Parameters
bitcodeBinary LLVM bitcode (e.g. the contents of a *.bc file)
lengthLength of the bitcode buffer
moduleModule to link the bitcode into
symbolTableSymbol table to add definitions to

Definition at line 794 of file builtins.cpp.

References Assert, Globals::ctx, Debug(), Error(), g, Target::getISA(), lAddModuleSymbols(), lCheckModuleIntrinsics(), lSetInternalFunctions(), m, Module::module, Globals::target, VerifyDataLayoutCompatibility(), and Warning().

Referenced by 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.

Parameters
symbolTableSymbolTable in which to add symbol definitions for stdlib stuff
ctxllvm::LLVMContext to use for getting types and the like for standard library definitions
moduleModule in which to add the declarations/definitions
includeStdlibIndicates whether the definitions from the stdlib.ispc file should be added to the module.

Definition at line 1113 of file builtins.cpp.

References Assert, Target::AVX, Target::AVX11, Target::AVX2, EXPORT_MODULE, EXPORT_MODULE_COND_WARN, Opt::fastMaskedVload, FATAL, Globals::forceAlignment, g, Target::GENERIC, Target::getDataTypeWidth(), Target::getISA(), Target::getMaskBitCount(), Target::getVectorWidth(), Target::hasHalf(), Target::hasRand(), Target::hasRcpd(), Target::hasRsqrtd(), Target::hasTranscendentals(), Target::hasTrigonometry(), Target::is32Bit(), Target::KNL_AVX512, lDefineConstantInt(), lDefineConstantIntFunc(), lDefineProgramIndex(), LLVMInt32(), Globals::Math_ISPC, Globals::Math_ISPCFast, Globals::Math_SVML, Globals::Math_System, Globals::mathLib, Globals::opt, Target::SKX_AVX512, Target::SSE2, Target::SSE4, Globals::target, yy_scan_string(), and yyparse().

Referenced by Module::CompileFile().