roadrunner  2.6.0
Fast simulator for SBML models
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rrllvm::CodeGenBase< FunctionPtrType > Class Template Referenceabstract

a convenience class to pull the vars out of a context, and store them as ivars. More...

#include <CodeGenBase.h>

Inheritance diagram for rrllvm::CodeGenBase< FunctionPtrType >:
rrllvm::GetEventValueCodeGenBase< GetEventTriggerCodeGen, GetEventTriggerCodeGen_FunctionPtr > rrllvm::GetEventTriggerCodeGen

Public Types

typedef FunctionPtrType FunctionPtr
 

Public Member Functions

llvm::Function * createFunction ()
 

Protected Member Functions

 CodeGenBase (const ModelGeneratorContext &mgc)
 
virtual llvm::Value * codeGen ()=0
 
template<size_t N>
llvm::BasicBlock * codeGenHeader (const char *functionName, llvm::Type *retType, llvm::Type *(&argTypes)[N], const char *(&argNames)[N], llvm::Value *(&args)[N])
 
llvm::BasicBlock * codeGenVoidModelDataHeader (const char *functionName, llvm::Value *&modelData)
 the most common type of generated function takes a ModelData*, and returns void.
 
llvm::Function * verifyFunction ()
 

Protected Attributes

const ModelGeneratorContextmodelGenContext
 
const libsbml::Model * model
 could potentially be null, everything else is guaranteed to be valid
 
const LLVMModelDataSymbolsdataSymbols
 
const LLVMModelSymbolsmodelSymbols
 
llvm::LLVMContext & context
 
llvm::Module * module
 
llvm::IRBuilder & builder
 
llvm::Function * function
 
llvm::legacy::FunctionPassManager * functionPassManager
 function pass manager. More...
 
const unsigned options
 the options bit field that was passed into the top level load method.
 

Detailed Description

template<typename FunctionPtrType>
class rrllvm::CodeGenBase< FunctionPtrType >

a convenience class to pull the vars out of a context, and store them as ivars.

It can get tedious alwasy typing mgc.getThis and mgc.getThat. Furthermore, its faster to access them as ivars as it does not incur a func call each time.

Member Function Documentation

◆ verifyFunction()

template<typename FunctionPtrType >
llvm::Function* rrllvm::CodeGenBase< FunctionPtrType >::verifyFunction ( )
inlineprotected

verifyFunction - Check a function for errors, printing messages on stderr. Return true if the function is corrupt.

Member Data Documentation

◆ functionPassManager

template<typename FunctionPtrType >
llvm::legacy::FunctionPassManager* rrllvm::CodeGenBase< FunctionPtrType >::functionPassManager
protected

function pass manager.

Null if no optimization.


The documentation for this class was generated from the following file: