Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #ifndef rbi_INCLUDED
00050 #define rbi_INCLUDED "rbi.h"
00051 #ifdef _KEEP_RCS_ID
00052 #endif
00053
00054 #include "region_util.h"
00055
00056 const INT32 WN_PROP_USED_IN = 0x01,
00057 WN_PROP_DEF_IN = 0x02,
00058 WN_PROP_LIVE_OUT = 0x04;
00059
00060 class RBI {
00061
00062 private:
00063 INT32 _trace_level;
00064 MEM_POOL *_pool;
00065 WN_MAP _prop_map;
00066 WN_MAP _tag_map;
00067
00068 public:
00069 RBI(MEM_POOL *);
00070 ~RBI(void);
00071
00072
00073
00074
00075 BOOL Trace( void ) const { return _trace_level > 0; }
00076 BOOL Trace2( void ) const { return _trace_level == 2; }
00077
00078 MEM_POOL *Mem_Pool( void ) { return _pool; }
00079
00080 void RBI_Calc_Kids(RID *root, const DU_MANAGER *du_mgr,
00081 const ALIAS_MANAGER *am);
00082
00083 void RBI_Calc_Rgn(RID *const rid_node, const DU_MANAGER *const du_mgr,
00084 const ALIAS_MANAGER *const am);
00085
00086 INT32 Rgn_WN_Tag( WN *const wn ) const
00087 {
00088 return WN_MAP32_Get( _tag_map, wn );
00089 }
00090
00091 void Set_WN_Cur_Rgn( WN* wn, INT32 rgn_id )
00092 {
00093 WN_MAP32_Set( _tag_map, wn, rgn_id );
00094 }
00095
00096 BOOL Outside_Cur_Rgn( WN* wn, INT32 rgn_id ) const
00097 {
00098
00099
00100
00101
00102 if (WN_opcode(wn) == OPC_RETURN)
00103 return TRUE;
00104 else
00105 return (Rgn_WN_Tag(wn) != rgn_id);
00106 }
00107
00108 INT32 Get_WN_Prop( WN *const wn ) const
00109 {
00110 return WN_MAP32_Get( _prop_map, wn );
00111 }
00112
00113 void Set_WN_Prop( WN *const, const INT32 );
00114
00115 void Set_PT_SET_All_Aliasable(POINTS_TO_SET *);
00116
00117 void Add_To_PT_SET(POINTS_TO_SET *, POINTS_TO *);
00118
00119 };
00120
00121 extern "C" void Region_Bound_Info(WN *tree,
00122 DU_MANAGER *du_mgr,
00123 ALIAS_MANAGER *am);
00124
00125 #endif