ClearBlue
SEGBinaryWithIntConstNode.h
1 /*
2  * SEGBinaryWithIntNode.h
3  *
4  * Qingkai
5  *
6  * This node is to model a binary opcode, whose children are
7  * a seg operand node and a constant integer.
8  */
9 
10 #ifndef IR_SEG_SEGBINARYWITHINTCONSTNODE_H
11 #define IR_SEG_SEGBINARYWITHINTCONSTNODE_H
12 
13 #include <llvm/IR/BasicBlock.h>
14 
15 #include "IR/SEG/SymbolicExprGraph.h"
16 
17 using namespace llvm;
18 
19 class PersistedSEGBinaryWithIntConstNode;
20 
22 public:
25  SEGBinaryWithIntConstNode(PersistedSEGBinaryWithIntConstNode *Node,
26  SymbolicExprGraph *SEG);
27 
28  virtual void assembleSEGObject(std::map<int, SEGObject *> &FuncSEGObjMap) {
29  SEGOpcodeNode::assembleSEGObject(FuncSEGObjMap);
30  }
31 
32 private:
33  uint64_t IntConst;
34 
35  SEGBinaryWithIntConstNode(CodeKind Opcode, Type *Ty, SymbolicExprGraph *SEG,
36  BasicBlock *BB, uint64_t Const);
37 
38  friend class SymbolicExprGraph;
39 
40 public:
41  virtual ~SEGBinaryWithIntConstNode();
42 
43  virtual PersistedSEGObject *createPersistedObject(void) const;
44 
45  virtual void dot(raw_fd_ostream &O) const;
46 
47  uint64_t getIntConstant() const;
48 
49 public:
50  static bool classof(const SEGObject *N) {
51  return N->getKind() == SEGOBJK_BinaryWithIntConst;
52  }
53 };
54 
55 #endif
SymbolicExprGraph::dot
void dot(const char *FileName) const
Dot this graph to a file with filename.
Definition: SymbolicExprGraph.cpp:1539
SymbolicExprGraph
Definition: SymbolicExprGraph.h:855
SEGOpcodeNode::assembleSEGObject
virtual void assembleSEGObject(std::map< int, SEGObject * > &FuncSEGObjMap)
Assemble the SEG object's related objects.
Definition: SymbolicExprGraph.h:630
SEGObject
Definition: SymbolicExprGraph.h:87
SEGBinaryWithIntConstNode::assembleSEGObject
virtual void assembleSEGObject(std::map< int, SEGObject * > &FuncSEGObjMap)
Assemble the SEG object's related objects.
Definition: SEGBinaryWithIntConstNode.h:28
SEGOpcodeNode
Definition: SymbolicExprGraph.h:624
SEGBinaryWithIntConstNode
Definition: SEGBinaryWithIntConstNode.h:21