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

src/share/vm/c1/c1_ValueMap.hpp

Print this page

        

*** 131,189 **** virtual void kill_memory() = 0; virtual void kill_field(ciField* field) = 0; virtual void kill_array(ValueType* type) = 0; // visitor functions ! void do_StoreField (StoreField* x) { kill_field(x->field()); }; ! void do_StoreIndexed (StoreIndexed* x) { kill_array(x->type()); }; ! void do_MonitorEnter (MonitorEnter* x) { kill_memory(); }; ! void do_MonitorExit (MonitorExit* x) { kill_memory(); }; ! void do_Invoke (Invoke* x) { kill_memory(); }; ! void do_UnsafePutRaw (UnsafePutRaw* x) { kill_memory(); }; ! void do_UnsafePutObject(UnsafePutObject* x) { kill_memory(); }; ! void do_Intrinsic (Intrinsic* x) { if (!x->preserves_state()) kill_memory(); }; ! void do_Phi (Phi* x) { /* nothing to do */ }; ! void do_Local (Local* x) { /* nothing to do */ }; ! void do_Constant (Constant* x) { /* nothing to do */ }; ! void do_LoadField (LoadField* x) { /* nothing to do */ }; ! void do_ArrayLength (ArrayLength* x) { /* nothing to do */ }; ! void do_LoadIndexed (LoadIndexed* x) { /* nothing to do */ }; ! void do_NegateOp (NegateOp* x) { /* nothing to do */ }; ! void do_ArithmeticOp (ArithmeticOp* x) { /* nothing to do */ }; ! void do_ShiftOp (ShiftOp* x) { /* nothing to do */ }; ! void do_LogicOp (LogicOp* x) { /* nothing to do */ }; ! void do_CompareOp (CompareOp* x) { /* nothing to do */ }; ! void do_IfOp (IfOp* x) { /* nothing to do */ }; ! void do_Convert (Convert* x) { /* nothing to do */ }; ! void do_NullCheck (NullCheck* x) { /* nothing to do */ }; ! void do_NewInstance (NewInstance* x) { /* nothing to do */ }; ! void do_NewTypeArray (NewTypeArray* x) { /* nothing to do */ }; ! void do_NewObjectArray (NewObjectArray* x) { /* nothing to do */ }; ! void do_NewMultiArray (NewMultiArray* x) { /* nothing to do */ }; ! void do_CheckCast (CheckCast* x) { /* nothing to do */ }; ! void do_InstanceOf (InstanceOf* x) { /* nothing to do */ }; ! void do_BlockBegin (BlockBegin* x) { /* nothing to do */ }; ! void do_Goto (Goto* x) { /* nothing to do */ }; ! void do_If (If* x) { /* nothing to do */ }; ! void do_IfInstanceOf (IfInstanceOf* x) { /* nothing to do */ }; ! void do_TableSwitch (TableSwitch* x) { /* nothing to do */ }; ! void do_LookupSwitch (LookupSwitch* x) { /* nothing to do */ }; ! void do_Return (Return* x) { /* nothing to do */ }; ! void do_Throw (Throw* x) { /* nothing to do */ }; ! void do_Base (Base* x) { /* nothing to do */ }; ! void do_OsrEntry (OsrEntry* x) { /* nothing to do */ }; ! void do_ExceptionObject(ExceptionObject* x) { /* nothing to do */ }; ! void do_RoundFP (RoundFP* x) { /* nothing to do */ }; ! void do_UnsafeGetRaw (UnsafeGetRaw* x) { /* nothing to do */ }; ! void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ }; ! void do_UnsafePrefetchRead (UnsafePrefetchRead* x) { /* nothing to do */ }; ! void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) { /* nothing to do */ }; ! void do_ProfileCall (ProfileCall* x) { /* nothing to do */ }; ! void do_ProfileCounter (ProfileCounter* x) { /* nothing to do */ }; }; class GlobalValueNumbering: public ValueNumberingVisitor { private: ValueMap* _current_map; // value map of current block ValueMapArray _value_maps; // list of value maps for all blocks --- 131,213 ---- virtual void kill_memory() = 0; virtual void kill_field(ciField* field) = 0; virtual void kill_array(ValueType* type) = 0; // visitor functions ! void do_StoreField (StoreField* x) { ! if (!x->is_initialized()) { ! kill_memory(); ! } else { ! kill_field(x->field()); ! } ! } ! void do_StoreIndexed (StoreIndexed* x) { kill_array(x->type()); } ! void do_MonitorEnter (MonitorEnter* x) { kill_memory(); } ! void do_MonitorExit (MonitorExit* x) { kill_memory(); } ! void do_Invoke (Invoke* x) { kill_memory(); } ! void do_UnsafePutRaw (UnsafePutRaw* x) { kill_memory(); } ! void do_UnsafePutObject(UnsafePutObject* x) { kill_memory(); } ! void do_Intrinsic (Intrinsic* x) { if (!x->preserves_state()) kill_memory(); } ! void do_Phi (Phi* x) { /* nothing to do */ } ! void do_Local (Local* x) { /* nothing to do */ } ! void do_Constant (Constant* x) { /* nothing to do */ } ! void do_LoadField (LoadField* x) { ! if (!x->is_initialized()) { ! kill_memory(); ! } ! } ! void do_ArrayLength (ArrayLength* x) { /* nothing to do */ } ! void do_LoadIndexed (LoadIndexed* x) { /* nothing to do */ } ! void do_NegateOp (NegateOp* x) { /* nothing to do */ } ! void do_ArithmeticOp (ArithmeticOp* x) { /* nothing to do */ } ! void do_ShiftOp (ShiftOp* x) { /* nothing to do */ } ! void do_LogicOp (LogicOp* x) { /* nothing to do */ } ! void do_CompareOp (CompareOp* x) { /* nothing to do */ } ! void do_IfOp (IfOp* x) { /* nothing to do */ } ! void do_Convert (Convert* x) { /* nothing to do */ } ! void do_NullCheck (NullCheck* x) { /* nothing to do */ } ! void do_NewInstance (NewInstance* x) { /* nothing to do */ } ! void do_NewTypeArray (NewTypeArray* x) { /* nothing to do */ } ! void do_NewObjectArray (NewObjectArray* x) { /* nothing to do */ } ! void do_NewMultiArray (NewMultiArray* x) { /* nothing to do */ } ! void do_CheckCast (CheckCast* x) { /* nothing to do */ } ! void do_InstanceOf (InstanceOf* x) { /* nothing to do */ } ! void do_BlockBegin (BlockBegin* x) { /* nothing to do */ } ! void do_Goto (Goto* x) { /* nothing to do */ } ! void do_If (If* x) { /* nothing to do */ } ! void do_IfInstanceOf (IfInstanceOf* x) { /* nothing to do */ } ! void do_TableSwitch (TableSwitch* x) { /* nothing to do */ } ! void do_LookupSwitch (LookupSwitch* x) { /* nothing to do */ } ! void do_Return (Return* x) { /* nothing to do */ } ! void do_Throw (Throw* x) { /* nothing to do */ } ! void do_Base (Base* x) { /* nothing to do */ } ! void do_OsrEntry (OsrEntry* x) { /* nothing to do */ } ! void do_ExceptionObject(ExceptionObject* x) { /* nothing to do */ } ! void do_RoundFP (RoundFP* x) { /* nothing to do */ } ! void do_UnsafeGetRaw (UnsafeGetRaw* x) { /* nothing to do */ } ! void do_UnsafeGetObject(UnsafeGetObject* x) { /* nothing to do */ } ! void do_UnsafePrefetchRead (UnsafePrefetchRead* x) { /* nothing to do */ } ! void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) { /* nothing to do */ } ! void do_ProfileCall (ProfileCall* x) { /* nothing to do */ } ! void do_ProfileCounter (ProfileCounter* x) { /* nothing to do */ } }; + + class ValueNumberingEffects: public ValueNumberingVisitor { + private: + ValueMap* _map; + + public: + // implementation for abstract methods of ValueNumberingVisitor + void kill_memory() { _map->kill_memory(); } + void kill_field(ciField* field) { _map->kill_field(field); } + void kill_array(ValueType* type) { _map->kill_array(type); } + + ValueNumberingEffects(ValueMap* map): _map(map) {} + }; + class GlobalValueNumbering: public ValueNumberingVisitor { private: ValueMap* _current_map; // value map of current block ValueMapArray _value_maps; // list of value maps for all blocks
src/share/vm/c1/c1_ValueMap.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File