diff options
Diffstat (limited to 'lib/Analysis/LiveVar/BBLiveVar.h')
| -rw-r--r-- | lib/Analysis/LiveVar/BBLiveVar.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/Analysis/LiveVar/BBLiveVar.h b/lib/Analysis/LiveVar/BBLiveVar.h index 7917cc2..e4d5804 100644 --- a/lib/Analysis/LiveVar/BBLiveVar.h +++ b/lib/Analysis/LiveVar/BBLiveVar.h @@ -1,8 +1,8 @@ -/* Title: ValueSet.h +/* Title: BBLiveVar.h Author: Ruchira Sasanka Date: Jun 30, 01 Purpose: This is a wrapper class for BasicBlock which is used by live - variable anaysis + variable anaysis. */ #ifndef LIVE_VAR_BB_H @@ -28,9 +28,10 @@ class BBLiveVar bool InSetChanged, OutSetChanged; // set if the InSet/OutSet is modified // map that contains phi args->BB they came + // set by calcDefUseSets & used by setPropagate hash_map<const Value *, const BasicBlock *, hashFuncValue> PhiArgMap; - // method to propogate an InSet to OutSet of a predecessor + // method to propogate an InSet to OutSet of a predecessor bool setPropagate( LiveVarSet *const OutSetOfPred, const LiveVarSet *const InSetOfThisBB, const BasicBlock *const PredBB); @@ -47,16 +48,18 @@ class BBLiveVar 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 + // calculates Out set using In sets of the predecessors bool applyFlowFunc(BBToBBLiveVarMapType LVMap); inline const LiveVarSet* getOutSet() const { return &OutSet; } inline const LiveVarSet* getInSet() const { return &InSet; } - void printAllSets() const; // for printing Def/In/Out sets - void printInOutSets() const; // for printing In/Out sets + void printAllSets() const; // for printing Def/In/Out sets + void printInOutSets() const; // for printing In/Out sets + + ~BBLiveVar() { } // nothing to do since only composite objects + - //TODO write a destructor to deallocate Def/In.Out sets and PhiArgMap }; @@ -65,5 +68,6 @@ class BBLiveVar + #endif |
