Minor change: Methods that return ValueSet's that are guaranteed to be valid
[oota-llvm.git] / lib / Target / SparcV9 / LiveVar / BBLiveVar.h
index 1fc91f1330021bb1e00b50174e942f67400df98d..442eb22c7310810a101900519de4ab66ed7792d9 100644 (file)
@@ -31,11 +31,12 @@ class BBLiveVar {
                     const BasicBlock *PredBB);
 
   // To add an operand which is a def
-  void  addDef(const Value *Op); 
+  void addDef(const Value *Op); 
 
   // To add an operand which is a use
-  void  addUse(const Value *Op);
+  void addUse(const Value *Op);
 
+  void calcDefUseSets();         // calculates the Def & Use sets for this BB
  public:
   BBLiveVar(const BasicBlock *BB, unsigned POID);
 
@@ -44,18 +45,16 @@ class BBLiveVar {
 
   inline unsigned getPOId() const { return POID; }
 
-  void calcDefUseSets();         // calculates the Def & Use sets for this BB
   bool applyTransferFunc();      // calcultes the In in terms of Out 
 
   // calculates Out set using In sets of the predecessors
   bool applyFlowFunc(std::map<const BasicBlock *, BBLiveVar *> &LVMap);    
 
-  inline const ValueSet *getOutSet() const { return &OutSet; }
-  inline const ValueSet  *getInSet() const { return &InSet; }
+  inline const ValueSet &getOutSet() const { return OutSet; }
+  inline const ValueSet  &getInSet() const { return InSet; }
 
   void printAllSets() const;      // for printing Def/In/Out sets
   void printInOutSets() const;    // for printing In/Out sets
 };
 
 #endif
-