ManagerSSAStandard.hpp

Go to the documentation of this file.
00001 
00015 #ifndef MANAGERSSASTANDARD_H
00016 #define MANAGERSSASTANDARD_H
00017 
00018 //--------------------------------------------------------------------
00019 // standard headers
00020 #ifdef NO_STD_CHEADERS
00021 # include <string.h>
00022 #else
00023 # include <cstring>
00024 #endif
00025 
00026 // STL headers
00027 #include <list>
00028 #include <set>
00029 #include <map>
00030 
00031 // OpenAnalysis headers
00032 #include <OpenAnalysis/Utils/OA_ptr.hpp>
00033 #include <OpenAnalysis/SSA/SSAStandard.hpp>
00034 #include <OpenAnalysis/IRInterface/SSAIRInterface.hpp>
00035 
00036 namespace OA {
00037   namespace SSA {
00038 
00039 
00040 //--------------------------------------------------------------------
00041 class Worklist;
00042 
00043 
00044 //--------------------------------------------------------------------
00049 class ManagerStandard { //??? eventually public OA::AnnotationManager
00050 public:
00051   ManagerStandard(OA_ptr<SSAIRInterface> _ir) : mIR(_ir) { }
00052   virtual ~ManagerStandard () { }
00053 
00054   //??? don't think this guy need AQM, but will eventually have
00055   //to have one so is standard with other AnnotationManagers
00056   virtual OA_ptr<SSA::SSAStandard> performAnalysis(ProcHandle,
00057                                                    OA_ptr<CFG::CFGInterface> cfg);
00058 
00059   //-------------------------------------
00060   // information access
00061   //-------------------------------------
00062   OA_ptr<SSAIRInterface> getIRInterface() { return mIR; }
00063 
00064   //------------------------------------------------------------------
00065   // Exceptions
00066   //------------------------------------------------------------------
00067   class SSAException : public Exception {
00068   public:
00069     void report(std::ostream& os) const 
00070       { os << "E!  Unexpected." << std::endl; }
00071   };
00072 
00073 private:
00074  
00075   //------------------------------------------------------------------
00076   // Methods that build SSAStandard
00077   //------------------------------------------------------------------
00078   void build(OA_ptr<CFG::CFGInterface> cfg);
00079 
00080 private:
00081   OA_ptr<SSAIRInterface> mIR;
00082   OA_ptr<SSAStandard> mSSA;
00083 };
00084 //--------------------------------------------------------------------
00085 
00086   } // end of SSA namespace
00087 } // end of OA namespace
00088 
00089 #endif