ip_ssa.hGo to the documentation of this file.00001
00002 #ifndef _ip_ssa_h
00003 #define _ip_ssa_h
00004
00005 #include "Program.h"
00006
00007 #include "code_domains.h"
00008
00009
00010 class GlobalDefSite : public Listable{
00011 private:
00012 ProgramUnit* _pgm;
00013 Statement* _stmt;
00014 public:
00015 GlobalDefSite(){
00016 _pgm=0;
00017 _stmt=0;
00018 }
00019 GlobalDefSite(ProgramUnit& pgm, Statement& stmt){
00020 _pgm=&pgm;
00021 _stmt=&stmt;
00022 }
00023 GlobalDefSite(const GlobalDefSite& other){
00024 _pgm=other._pgm;
00025 _stmt=other._stmt;
00026 }
00027 GlobalDefSite& operator=(const GlobalDefSite& other){
00028 _pgm=other._pgm;
00029 _stmt=other._stmt;
00030 return *this;
00031 }
00032 bool operator==(const GlobalDefSite& other){
00033 return (_pgm==other._pgm &&
00034 _stmt==other._stmt);
00035 }
00036 ~GlobalDefSite(){}
00037 ProgramUnit& pgm(){
00038 return *_pgm;
00039 }
00040 Statement& stmt(){
00041 return *_stmt;
00042 }
00043 void print(ostream& o) const{
00044 int dummy=1;
00045 o<<"GlobalDefSite: "<<_pgm->routine_name_ref()<<" : ";
00046 _stmt->write(o,dummy);
00047 }
00048 Listable* listable_clone() const{
00049 return new GlobalDefSite(*_pgm, *_stmt);
00050 }
00051 };
00052
00053
00054
00055 void build_in_out_sets(Program& prog, ProgramUnit& pgm);
00056
00057
00058
00059
00060
00061
00062 void build_in_out_set(Symbol& out, IntraPCodeDomain& domain,
00063 RefList<Symbol>& in,
00064 ProgramUnit& pgm, Program& prog);
00065
00066
00067
00068 Symbol* last_gsa_symbol(ProgramUnit& pgm, Symbol& sym);
00069
00070
00071
00072 void make_ip_ssa(Program& prog);
00073
00074
00075 void undo_ip_ssa(Program& prog);
00076
00077
00078
00079
00080
00081 Database<ProgramUnit*,
00082 Database<Statement*,
00083 RefDatabase<Symbol*,
00084 Symbol> > >& ip_ssa_gmap();
00085
00086
00087
00088
00089
00090 Database<ProgramUnit*,
00091 Database<Symbol*,
00092 List<GlobalDefSite> > >& ip_ssa_dmap();
00093
00094
00095 #endif
|