VaryStandard.hpp

Go to the documentation of this file.
00001 
00016 #ifndef VaryStandard_hpp
00017 #define VaryStandard_hpp
00018 
00019 #include <cassert>
00020 #include <iostream>
00021 #include <map>
00022 #include <set>
00023 #include <vector>
00024 #include <OpenAnalysis/Utils/OA_ptr.hpp>
00025 #include <OpenAnalysis/IRInterface/IRHandles.hpp>
00026 #include <OpenAnalysis/ReachDefs/Interface.hpp>
00027 #include <OpenAnalysis/DataFlow/LocDFSet.hpp>
00028 
00029 namespace OA {
00030   namespace Activity {
00031 
00032 
00033 
00034 class VaryStandard {
00035   public:
00036     VaryStandard(ProcHandle p);
00037     ~VaryStandard() {}
00038 
00041     OA_ptr<LocIterator> getIndepSetIterator();
00042 
00045     OA_ptr<LocIterator> getOutVaryIterator(StmtHandle s);
00046 
00049     //FIXME: an iterator or make getOutVaryIterator return a set?
00050     OA_ptr<DataFlow::LocDFSet> getInVarySet(ExprHandle call);
00051 
00052     //*****************************************************************
00053     // Construction methods 
00054     //*****************************************************************
00055 
00057     void insertIndepLoc(OA_ptr<Location> loc);
00058 
00060     void copyIntoOutVary(StmtHandle s, 
00061                          OA_ptr<DataFlow::LocDFSet> dfset);
00062 
00064     void copyIntoInVary(ExprHandle call, 
00065                         OA_ptr<DataFlow::LocDFSet> dfset);
00066 
00067     //*****************************************************************
00068     // Output
00069     //*****************************************************************
00070 
00073     void dump(std::ostream& os, OA_ptr<IRHandlesIRInterface> ir);
00074 
00075   private:
00076     // data members
00077     std::map<StmtHandle,OA_ptr<DataFlow::LocDFSet> > mOutVary;
00078     std::map<ExprHandle,OA_ptr<DataFlow::LocDFSet> > mInVary;
00079     OA_ptr<DataFlow::LocDFSet>  mIndepLocSet;
00080 
00081 };
00082 
00083   } // end of Activity namespace
00084 } // end of OA namespace
00085 
00086 #endif
00087