00001 //-*-c++-*- 00002 // ==================================================================== 00003 // ==================================================================== 00004 // 00005 // Module: opt_rviwn.h 00006 // $Revision: 1.1.1.1 $ 00007 // $Date: 2005/10/21 19:00:00 $ 00008 // $Author: marcel $ 00009 // $Source: /proj/osprey/CVS/open64/osprey1.0/be/opt/opt_rviwn.h,v $ 00010 // 00011 // ==================================================================== 00012 // 00013 // Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00014 // 00015 // This program is free software; you can redistribute it and/or modify 00016 // it under the terms of version 2 of the GNU General Public License as 00017 // published by the Free Software Foundation. 00018 // 00019 // This program is distributed in the hope that it would be useful, but 00020 // WITHOUT ANY WARRANTY; without even the implied warranty of 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00022 // 00023 // Further, this software is distributed without any warranty that it 00024 // is free of the rightful claim of any third person regarding 00025 // infringement or the like. Any license provided herein, whether 00026 // implied or otherwise, applies only to this software file. Patent 00027 // licenses, if any, provided herein do not apply to combinations of 00028 // this program with other software, or any other product whatsoever. 00029 // 00030 // You should have received a copy of the GNU General Public License 00031 // along with this program; if not, write the Free Software Foundation, 00032 // Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00033 // 00034 // Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00035 // Mountain View, CA 94043, or: 00036 // 00037 // http://www.sgi.com 00038 // 00039 // For further information regarding this notice, see: 00040 // 00041 // http://oss.sgi.com/projects/GenInfo/NoticeExplan 00042 // 00043 // ==================================================================== 00044 // 00045 // Description: 00046 // 00047 // WN interface for (RVI) Register-Variable Identification 00048 // 00049 // ==================================================================== 00050 // ==================================================================== 00051 00052 00053 #ifndef opt_rviwn_INCLUDED 00054 #define opt_rviwn_INCLUDED "opt_rviwn.h" 00055 #ifdef _KEEP_RCS_ID 00056 static char *opt_rviwnrcs_id = opt_rviwn_INCLUDED"$ $Revision$"; 00057 #endif /* _KEEP_RCS_ID */ 00058 00059 #ifndef stab_INCLUDED 00060 #include "stab.h" 00061 #endif /* stab_INCLUDED */ 00062 #ifndef opt_rvitab_INCLUDED 00063 #include "opt_rvitab.h" 00064 #endif // opt_rvitab_INCLUDED 00065 00066 // class to hold annotation information 00067 // 00068 class RVI_ANN : public SLIST_NODE { 00069 DECLARE_SLIST_NODE_CLASS(RVI_ANN); 00070 private: 00071 ST *_preg_st; // the preg's st 00072 mINT32 _preg; // the preg to use 00073 RVI_NODE *_rvi_node; // the node this is for 00074 00075 RVI_ANN( void ); // not used 00076 RVI_ANN(const RVI_ANN&); // not used 00077 RVI_ANN& operator = (const RVI_ANN&); 00078 public: 00079 RVI_ANN( ST *st, INT32 preg, RVI_NODE *rvi_node ) : 00080 _preg_st(st), _preg(preg), _rvi_node(rvi_node) 00081 {} 00082 ~RVI_ANN( void ) {} 00083 00084 // access methods 00085 ST *Preg_st( void ) const 00086 { return _preg_st; } 00087 INT32 Preg( void ) const 00088 { return _preg; } 00089 RVI_NODE *Rvi_node( void ) const 00090 { return _rvi_node; } 00091 IDX_32 Bitpos( void ) const 00092 { return _rvi_node->Bitpos(); } 00093 00094 // Get a TY_IDX associated with this preg 00095 TY_IDX Preg_ty( void ) const 00096 { return MTYPE_To_TY(TY_mtype(ST_type(Preg_st()))); } 00097 // create a new LDID of this preg 00098 WN *New_ldid( ALIAS_MANAGER *alias_mgr ) const; 00099 00100 // print out an annotation 00101 void Print( FILE *fp = stderr ) const; 00102 }; 00103 00104 00105 // singly linked list of RVI_ANNs 00106 // 00107 class RVI_ANN_LIST : public SLIST { 00108 DECLARE_SLIST_CLASS(RVI_ANN_LIST,RVI_ANN) 00109 private: 00110 RVI_ANN_LIST(const RVI_ANN_LIST&); 00111 RVI_ANN_LIST& operator = (const RVI_ANN_LIST&); 00112 public: 00113 ~RVI_ANN_LIST(void) {} // destructor, use mempool 00114 00115 // locate a bitpos in this list 00116 RVI_ANN *Find( const IDX_32 bitpos ); 00117 00118 // print out the annotation list 00119 void Print( FILE *fp = stderr ); 00120 00121 }; // end of class RVI_ANN_LIST; 00122 00123 00124 // class for iterating through lists of RVI_ANNs 00125 // 00126 class RVI_ANN_ITER : public SLIST_ITER { 00127 DECLARE_SLIST_ITER_CLASS(RVI_ANN_ITER, RVI_ANN, RVI_ANN_LIST) 00128 public: 00129 ~RVI_ANN_ITER(void) {} 00130 }; 00131 00132 00133 00134 #endif // opt_rviwn_INCLUDED
1.5.6