src/share/vm/c1/c1_ValueMap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/c1

src/share/vm/c1/c1_ValueMap.hpp

Print this page




 140 
 141   // visitor functions
 142   void do_StoreField     (StoreField*      x) {
 143     if (x->is_init_point() ||  // putstatic is an initialization point so treat it as a wide kill
 144         // This is actually too strict and the JMM doesn't require
 145         // this in all cases (e.g. load a; volatile store b; load a)
 146         // but possible future optimizations might require this.
 147         x->field()->is_volatile()) {
 148       kill_memory();
 149     } else {
 150       kill_field(x->field(), x->needs_patching());
 151     }
 152   }
 153   void do_StoreIndexed   (StoreIndexed*    x) { kill_array(x->type()); }
 154   void do_MonitorEnter   (MonitorEnter*    x) { kill_memory(); }
 155   void do_MonitorExit    (MonitorExit*     x) { kill_memory(); }
 156   void do_Invoke         (Invoke*          x) { kill_memory(); }
 157   void do_UnsafePutRaw   (UnsafePutRaw*    x) { kill_memory(); }
 158   void do_UnsafePutObject(UnsafePutObject* x) { kill_memory(); }
 159   void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) { kill_memory(); }






 160   void do_Intrinsic      (Intrinsic*       x) { if (!x->preserves_state()) kill_memory(); }
 161 
 162   void do_Phi            (Phi*             x) { /* nothing to do */ }
 163   void do_Local          (Local*           x) { /* nothing to do */ }
 164   void do_Constant       (Constant*        x) { /* nothing to do */ }
 165   void do_LoadField      (LoadField*       x) {
 166     if (x->is_init_point() ||         // getstatic is an initialization point so treat it as a wide kill
 167         x->field()->is_volatile()) {  // the JMM requires this
 168       kill_memory();
 169     }
 170   }
 171   void do_ArrayLength    (ArrayLength*     x) { /* nothing to do */ }
 172   void do_LoadIndexed    (LoadIndexed*     x) { /* nothing to do */ }
 173   void do_NegateOp       (NegateOp*        x) { /* nothing to do */ }
 174   void do_ArithmeticOp   (ArithmeticOp*    x) { /* nothing to do */ }
 175   void do_ShiftOp        (ShiftOp*         x) { /* nothing to do */ }
 176   void do_LogicOp        (LogicOp*         x) { /* nothing to do */ }
 177   void do_CompareOp      (CompareOp*       x) { /* nothing to do */ }
 178   void do_IfOp           (IfOp*            x) { /* nothing to do */ }
 179   void do_Convert        (Convert*         x) { /* nothing to do */ }
 180   void do_NullCheck      (NullCheck*       x) { /* nothing to do */ }
 181   void do_TypeCast       (TypeCast*        x) { /* nothing to do */ }
 182   void do_NewInstance    (NewInstance*     x) { /* nothing to do */ }
 183   void do_NewTypeArray   (NewTypeArray*    x) { /* nothing to do */ }
 184   void do_NewObjectArray (NewObjectArray*  x) { /* nothing to do */ }
 185   void do_NewMultiArray  (NewMultiArray*   x) { /* nothing to do */ }
 186   void do_CheckCast      (CheckCast*       x) { /* nothing to do */ }
 187   void do_InstanceOf     (InstanceOf*      x) { /* nothing to do */ }
 188   void do_BlockBegin     (BlockBegin*      x) { /* nothing to do */ }
 189   void do_Goto           (Goto*            x) { /* nothing to do */ }
 190   void do_If             (If*              x) { /* nothing to do */ }
 191   void do_IfInstanceOf   (IfInstanceOf*    x) { /* nothing to do */ }
 192   void do_TableSwitch    (TableSwitch*     x) { /* nothing to do */ }
 193   void do_LookupSwitch   (LookupSwitch*    x) { /* nothing to do */ }
 194   void do_Return         (Return*          x) { /* nothing to do */ }
 195   void do_Throw          (Throw*           x) { /* nothing to do */ }
 196   void do_Base           (Base*            x) { /* nothing to do */ }
 197   void do_OsrEntry       (OsrEntry*        x) { /* nothing to do */ }
 198   void do_ExceptionObject(ExceptionObject* x) { /* nothing to do */ }
 199   void do_RoundFP        (RoundFP*         x) { /* nothing to do */ }
 200   void do_UnsafeGetRaw   (UnsafeGetRaw*    x) { /* nothing to do */ }
 201   void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ }
 202   void do_ProfileCall    (ProfileCall*     x) { /* nothing to do */ }
 203   void do_ProfileReturnType (ProfileReturnType*  x) { /* nothing to do */ }
 204   void do_ProfileInvoke  (ProfileInvoke*   x) { /* nothing to do */ };
 205   void do_RuntimeCall    (RuntimeCall*     x) { /* nothing to do */ };
 206   void do_MemBar         (MemBar*          x) { /* nothing to do */ };
 207   void do_RangeCheckPredicate(RangeCheckPredicate* x) { /* nothing to do */ };
 208 #ifdef ASSERT
 209   void do_Assert         (Assert*          x) { /* nothing to do */ };
 210 #endif
 211 };
 212 
 213 
 214 class ValueNumberingEffects: public ValueNumberingVisitor {
 215  private:
 216   ValueMap*     _map;
 217 
 218  public:
 219   // implementation for abstract methods of ValueNumberingVisitor
 220   void          kill_memory()                                 { _map->kill_memory(); }
 221   void          kill_field(ciField* field, bool all_offsets)  { _map->kill_field(field, all_offsets); }




 140 
 141   // visitor functions
 142   void do_StoreField     (StoreField*      x) {
 143     if (x->is_init_point() ||  // putstatic is an initialization point so treat it as a wide kill
 144         // This is actually too strict and the JMM doesn't require
 145         // this in all cases (e.g. load a; volatile store b; load a)
 146         // but possible future optimizations might require this.
 147         x->field()->is_volatile()) {
 148       kill_memory();
 149     } else {
 150       kill_field(x->field(), x->needs_patching());
 151     }
 152   }
 153   void do_StoreIndexed   (StoreIndexed*    x) { kill_array(x->type()); }
 154   void do_MonitorEnter   (MonitorEnter*    x) { kill_memory(); }
 155   void do_MonitorExit    (MonitorExit*     x) { kill_memory(); }
 156   void do_Invoke         (Invoke*          x) { kill_memory(); }
 157   void do_UnsafePutRaw   (UnsafePutRaw*    x) { kill_memory(); }
 158   void do_UnsafePutObject(UnsafePutObject* x) { kill_memory(); }
 159   void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) { kill_memory(); }
 160   void do_UnsafeGetRaw   (UnsafeGetRaw*    x) { /* nothing to do */ }
 161   void do_UnsafeGetObject(UnsafeGetObject* x) {
 162     if (x->is_volatile()) { // the JMM requires this
 163       kill_memory();
 164     }
 165   }
 166   void do_Intrinsic      (Intrinsic*       x) { if (!x->preserves_state()) kill_memory(); }
 167 
 168   void do_Phi            (Phi*             x) { /* nothing to do */ }
 169   void do_Local          (Local*           x) { /* nothing to do */ }
 170   void do_Constant       (Constant*        x) { /* nothing to do */ }
 171   void do_LoadField      (LoadField*       x) {
 172     if (x->is_init_point() ||         // getstatic is an initialization point so treat it as a wide kill
 173         x->field()->is_volatile()) {  // the JMM requires this
 174       kill_memory();
 175     }
 176   }
 177   void do_ArrayLength    (ArrayLength*     x) { /* nothing to do */ }
 178   void do_LoadIndexed    (LoadIndexed*     x) { /* nothing to do */ }
 179   void do_NegateOp       (NegateOp*        x) { /* nothing to do */ }
 180   void do_ArithmeticOp   (ArithmeticOp*    x) { /* nothing to do */ }
 181   void do_ShiftOp        (ShiftOp*         x) { /* nothing to do */ }
 182   void do_LogicOp        (LogicOp*         x) { /* nothing to do */ }
 183   void do_CompareOp      (CompareOp*       x) { /* nothing to do */ }
 184   void do_IfOp           (IfOp*            x) { /* nothing to do */ }
 185   void do_Convert        (Convert*         x) { /* nothing to do */ }
 186   void do_NullCheck      (NullCheck*       x) { /* nothing to do */ }
 187   void do_TypeCast       (TypeCast*        x) { /* nothing to do */ }
 188   void do_NewInstance    (NewInstance*     x) { /* nothing to do */ }
 189   void do_NewTypeArray   (NewTypeArray*    x) { /* nothing to do */ }
 190   void do_NewObjectArray (NewObjectArray*  x) { /* nothing to do */ }
 191   void do_NewMultiArray  (NewMultiArray*   x) { /* nothing to do */ }
 192   void do_CheckCast      (CheckCast*       x) { /* nothing to do */ }
 193   void do_InstanceOf     (InstanceOf*      x) { /* nothing to do */ }
 194   void do_BlockBegin     (BlockBegin*      x) { /* nothing to do */ }
 195   void do_Goto           (Goto*            x) { /* nothing to do */ }
 196   void do_If             (If*              x) { /* nothing to do */ }
 197   void do_IfInstanceOf   (IfInstanceOf*    x) { /* nothing to do */ }
 198   void do_TableSwitch    (TableSwitch*     x) { /* nothing to do */ }
 199   void do_LookupSwitch   (LookupSwitch*    x) { /* nothing to do */ }
 200   void do_Return         (Return*          x) { /* nothing to do */ }
 201   void do_Throw          (Throw*           x) { /* nothing to do */ }
 202   void do_Base           (Base*            x) { /* nothing to do */ }
 203   void do_OsrEntry       (OsrEntry*        x) { /* nothing to do */ }
 204   void do_ExceptionObject(ExceptionObject* x) { /* nothing to do */ }
 205   void do_RoundFP        (RoundFP*         x) { /* nothing to do */ }


 206   void do_ProfileCall    (ProfileCall*     x) { /* nothing to do */ }
 207   void do_ProfileReturnType (ProfileReturnType*  x) { /* nothing to do */ }
 208   void do_ProfileInvoke  (ProfileInvoke*   x) { /* nothing to do */ };
 209   void do_RuntimeCall    (RuntimeCall*     x) { /* nothing to do */ };
 210   void do_MemBar         (MemBar*          x) { /* nothing to do */ };
 211   void do_RangeCheckPredicate(RangeCheckPredicate* x) { /* nothing to do */ };
 212 #ifdef ASSERT
 213   void do_Assert         (Assert*          x) { /* nothing to do */ };
 214 #endif
 215 };
 216 
 217 
 218 class ValueNumberingEffects: public ValueNumberingVisitor {
 219  private:
 220   ValueMap*     _map;
 221 
 222  public:
 223   // implementation for abstract methods of ValueNumberingVisitor
 224   void          kill_memory()                                 { _map->kill_memory(); }
 225   void          kill_field(ciField* field, bool all_offsets)  { _map->kill_field(field, all_offsets); }


src/share/vm/c1/c1_ValueMap.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File