roadrunner  2.6.0
Fast simulator for SBML models
FunctionResolver.h
1 /*
2  * FunctionResolver.h
3  *
4  * Created on: Aug 11, 2013
5  * Author: andy
6  */
7 
8 #ifndef EVENTSYMBOLRESOLVER_H_
9 #define EVENTSYMBOLRESOLVER_H_
10 
11 #include "CodeGen.h"
12 #include "ModelGeneratorContext.h"
13 #include <map>
14 
15 namespace rrllvm
16 {
17 
22 {
23 public:
24  FunctionResolver(LoadSymbolResolver& parentResolver,
25  llvm::Value *modelData,
26  const ModelGeneratorContext& ctx);
27 
28  virtual ~FunctionResolver() {};
29 
30  virtual llvm::Value *loadSymbolValue(const std::string& symbol,
31  const llvm::ArrayRef<llvm::Value*>& args =
32  llvm::ArrayRef<llvm::Value*>());
33 
34  virtual void recursiveSymbolPush(const std::string& symbol);
35 
36  virtual void recursiveSymbolPop();
37 
38  virtual bool isLocalParameter(const std::string& symbol);
39 
40 private:
41  LoadSymbolResolver& parentResolver;
42  const ModelGeneratorContext& modelGenContext;
43  const libsbml::Model *model;
44  llvm::IRBuilder<> &builder;
45  llvm::Value *modelData;
46 
51  std::map<std::string, llvm::Value*> *symbols;
52 };
53 
54 } /* namespace rr */
55 #endif /* EVENTSYMBOLRESOLVER_H_ */
Not thread safe – but perfectly fine if stack allocated.
Definition: FunctionResolver.h:22
virtual llvm::Value * loadSymbolValue(const std::string &symbol, const llvm::ArrayRef< llvm::Value * > &args=llvm::ArrayRef< llvm::Value * >())
generate an LLVM load instruction.
Definition: FunctionResolver.cpp:43
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