ClearBlue
SEGCallSiteReturnSummaryNode.h
1 /*
2  * SEGCallSiteReturnSummaryNode.h
3  *
4  * This node is to model a summary node passed from callee to caller.
5  *
6  * Created on: 2016.12.15
7  * Author: andyzhou
8  */
9 
10 #ifndef IR_SEG_SEGCALLSITERETURNSUMMARYNODE_H
11 #define IR_SEG_SEGCALLSITERETURNSUMMARYNODE_H
12 
13 #include "IR/SEG/SEGCallSite.h"
14 #include "IR/SEG/SymbolicExprGraph.h"
15 
16 using namespace llvm;
17 
19 
21 private:
22  // The callsite that the summary node is created for
23  Instruction *Callsite = nullptr;
24 
25  // 0-1 confidence of that the node is valid
26  float Confidence;
27 
28  SEGCallSiteReturnSummaryNode(Type *Ty, SymbolicExprGraph *SEG, BasicBlock *BB,
29  Instruction *Callsite, float Confidence,
30  bool fromDisk);
31 
32 public:
34 
35 public:
36  static bool classof(const SEGObject *N) {
37  return N->getKind() == SEGOBJK_CallSiteSummaryReturn;
38  }
39 
40  Instruction *getCallSiteInst() const { return Callsite; }
41 
42  float getConfidence() const { return Confidence; }
43 
44  SEGCallSite *getSEGCallSite() const {
45  SEGSiteBase *SEGSite =
46  getParentGraph()->findSite<SEGSiteBase>(getCallSiteInst());
47  return dyn_cast<SEGCallSite>(SEGSite);
48  }
49 
50  friend class SymbolicExprGraph;
51 };
52 
53 #endif /* IR_SEG_SEGCALLSITERETURNSUMMARYNODE_H */
SEGOperandNode
Definition: SymbolicExprGraph.h:456
SEGCallSite
Definition: SEGCallSite.h:51
SymbolicExprGraph
Definition: SymbolicExprGraph.h:708
SEGCallSiteReturnSummaryNode
Definition: SEGCallSiteReturnSummaryNode.h:20
SEGObject
Definition: SymbolicExprGraph.h:76
SEGSiteBase
Definition: SymbolicExprGraph.h:663