ActivePerStmt.hpp

Go to the documentation of this file.
00001 
00015 #ifndef ActivePerStmt_hpp
00016 #define ActivePerStmt_hpp
00017 
00018 #include <cassert>
00019 #include <iostream>
00020 #include <map>
00021 #include <set>
00022 #include <vector>
00023 #include <OpenAnalysis/Utils/OA_ptr.hpp>
00024 #include <OpenAnalysis/IRInterface/IRHandles.hpp>
00025 #include <OpenAnalysis/DataFlow/LocDFSet.hpp>
00026 #include <OpenAnalysis/OABase/Annotation.hpp>
00027 
00028 namespace OA {
00029   namespace Activity {
00030 
00031 
00032 
00033 class ActivePerStmt : public virtual Annotation {
00034   public:
00035     ActivePerStmt();
00036     ~ActivePerStmt() {}
00037 
00040     OA_ptr<DataFlow::LocDFSet> getInActiveSet(StmtHandle s);
00041 
00044     OA_ptr<DataFlow::LocDFSet> getOutActiveSet(StmtHandle s);
00045 
00047     int getNumIter() { return mNumIter; }
00048 
00049     //*****************************************************************
00050     // Construction methods 
00051     //*****************************************************************
00052 
00054     void copyIntoInActive(StmtHandle s, OA_ptr<DataFlow::LocDFSet> dfset);
00055 
00057     void copyIntoOutActive(StmtHandle s, OA_ptr<DataFlow::LocDFSet> dfset);
00058     
00060     void setNumIter(int n) { mNumIter = n; }
00061 
00062     //*****************************************************************
00063     // Annotation Interface
00064     //*****************************************************************
00065     void output(IRHandlesIRInterface &ir);
00066 
00067     //*****************************************************************
00068     // Output
00069     //*****************************************************************
00070 
00072     void dump(std::ostream& os, OA_ptr<IRHandlesIRInterface> ir);
00073 
00074   private:
00075     // data members
00076     std::map<StmtHandle,OA_ptr<DataFlow::LocDFSet> > mInActive;
00077     std::map<StmtHandle,OA_ptr<DataFlow::LocDFSet> > mOutActive;
00078     int mNumIter;
00079 };
00080 
00081   } // end of Activity namespace
00082 } // end of OA namespace
00083 
00084 #endif
00085 

Generated on Sat Oct 31 05:21:19 2009 for OpenAnalysis by  doxygen 1.6.1