10 #ifndef ASTNodeCodeGenH
11 #define ASTNodeCodeGenH
13 #include "LLVMIncludes.h"
15 #include "ModelGeneratorContext.h"
18 static std::mutex ASTNodeMtx;
36 llvm::Value *modelData);
39 llvm::Value* codeGenDouble(
const libsbml::ASTNode* ast);
40 llvm::Value* codeGenBoolean(
const libsbml::ASTNode* ast);
42 llvm::Value* codeGen(
const libsbml::ASTNode* ast);
48 llvm::Value *binaryExprCodeGen(
const libsbml::ASTNode *ast);
50 llvm::Value *notImplemented(
const libsbml::ASTNode *ast);
52 llvm::Value *delayExprCodeGen(
const libsbml::ASTNode *ast);
54 llvm::Value* rateOfCodeGen(
const libsbml::ASTNode* ast);
56 llvm::Value *nameExprCodeGen(
const libsbml::ASTNode *ast);
58 llvm::Value *realExprCodeGen(
const libsbml::ASTNode *ast);
63 llvm::Value *distribCodeGen(
const libsbml::ASTNode *ast);
71 llvm::Value *integerCodeGen(
const libsbml::ASTNode *ast);
78 llvm::Value *applyArithmeticCodeGen(
const libsbml::ASTNode *ast);
80 llvm::Value *minmaxCodeGen(
const libsbml::ASTNode *ast);
85 llvm::Value *applyBinaryRelationalCodeGen(
const libsbml::ASTNode *ast,
86 llvm::Value* left, llvm::Value* right);
89 llvm::Value *applyScalarRelationalCodeGen(
const libsbml::ASTNode *ast);
92 llvm::Value *applyRelationalCodeGen(
const libsbml::ASTNode *ast);
94 llvm::Value *applyLogicalCodeGen(
const libsbml::ASTNode *ast);
96 llvm::Value *functionCallCodeGen(
const libsbml::ASTNode *ast);
98 llvm::Value *intrinsicCallCodeGen(
const libsbml::ASTNode *ast);
100 llvm::Value *piecewiseCodeGen(
const libsbml::ASTNode *ast);
107 llvm::Value *toBoolean(llvm::Value *value);
114 llvm::Value *toDouble(llvm::Value* value);
117 llvm::IRBuilder<> &builder;
120 llvm::Value *modelData;
130 llvm::Module *getModule();
137 std::string to_string(
const libsbml::ASTNode *ast);
Used in LoadSymbolResolverBase::loadReactionRate when resolving a kinetic law.
Definition: ASTNodeCodeGen.h:143
All of the LLVM IR generation is handled here.
Definition: ASTNodeCodeGen.h:31
LLVM load instruction class.
Definition: CodeGen.h:37
All LLVM code generating objects basically need at a minimum three things to operate:
Definition: ModelGeneratorContext.h:95