ClearBlue
SEGStoreMemNode.h
1 /*
2  * SEGStoreMemNode.h
3  *
4  * Qingkai
5  *
6  * This node is to model a value stored in a memory.
7  */
8 
9 #ifndef IR_SEG_SEGSTOREMEMNODE_H
10 #define IR_SEG_SEGSTOREMEMNODE_H
11 
12 #include <llvm/IR/BasicBlock.h>
13 #include <llvm/IR/Function.h>
14 #include <llvm/IR/Instructions.h>
15 #include <llvm/IR/Value.h>
16 
17 #include "IR/SEG/SymbolicExprGraph.h"
18 
19 using namespace llvm;
20 
24 
25 private:
26  Instruction *StoreSite = nullptr;
27  Value *StoreValue = nullptr;
28  friend class SymbolicExprGraph;
29 
30  SEGStoreMemNode(Type *Ty, Instruction *StoreSite, Value *StoreVal,
31  BasicBlock *BB, SymbolicExprGraph *SEG, bool fromDisk);
32 
33 public:
34  ~SEGStoreMemNode() {}
35 
36  Instruction *getStoreSite() const { return StoreSite; }
37 
38  StoreInst *getStoreSiteAsStoreInst() const {
39  if (!StoreSite)
40  return nullptr;
41  return dyn_cast<StoreInst>(StoreSite);
42  }
43 
44  Value *getStoreValue() const { return StoreValue; }
45 
46  void dot(raw_fd_ostream &O) const override;
47 
48  virtual Instruction *getLLVMDbgInstruction() const override;
49 
50 public:
51  static bool classof(const SEGObject *N) {
52  return N->getKind() == SEGOBJK_StoreMem;
53  }
54 };
55 
56 #endif
SEGStoreMemNode
Definition: SEGStoreMemNode.h:23
SymbolicExprGraph::dot
void dot(const char *FileName) const
Dot this graph to a file with filename.
Definition: SymbolicExprGraph.cpp:881
SEGOperandNode
Definition: SymbolicExprGraph.h:456
SymbolicExprGraph
Definition: SymbolicExprGraph.h:708
SEGObject
Definition: SymbolicExprGraph.h:76