9 #ifndef IR_SEG_SEGPHINODE_H 
   10 #define IR_SEG_SEGPHINODE_H 
   12 #include <llvm/IR/BasicBlock.h> 
   13 #include <llvm/IR/CallSite.h> 
   14 #include <llvm/IR/Constants.h> 
   15 #include <llvm/IR/Function.h> 
   16 #include <llvm/IR/Instructions.h> 
   17 #include <llvm/IR/Value.h> 
   18 #include <llvm/Support/FileSystem.h> 
   19 #include <llvm/Support/Format.h> 
   20 #include <llvm/Support/raw_ostream.h> 
   22 #include "IR/SEG/SymbolicExprGraph.h" 
   29   friend class SEGSerializer;
 
   35     BasicBlock *BB = 
nullptr; 
 
   44   std::vector<IncomeNode> InComingNodes;
 
   55   typedef std::vector<IncomeNode>::const_iterator const_iterator;
 
   63     Node.ValNode = InValue;
 
   65     Node.InCondNode = condValue;
 
   67     InComingNodes.emplace_back(Node);
 
   73   std::pair<SEGNodeBase *, bool> getInCond(
size_t I) {
 
   74     assert(I < size() && 
"getInCond i should less than the size.");
 
   76     auto &InComingNode = InComingNodes[I];
 
   77     return std::make_pair(InComingNode.InCondNode, InComingNode.Cond);
 
   80   IncomeNode *getIncomeNode(
size_t I) {
 
   81     assert(I < size() && 
"getInCond i should less than the size.");
 
   82     return &InComingNodes[I];
 
   85   void dot(raw_fd_ostream &O) 
const;
 
   88   bool isTerminalNode()
 const { 
return InComingNodes.empty(); }
 
   90   const_iterator begin()
 const { 
return InComingNodes.begin(); }
 
   92   const_iterator end()
 const { 
return InComingNodes.end(); }
 
   94   size_t size()
 const { 
return InComingNodes.size(); }
 
   96   bool empty()
 const { 
return InComingNodes.empty(); }
 
  100     return O->getKind() == SEGOBJK_Phi;