hotspot/src/share/vm/c1/c1_ValueMap.hpp
Print this page
rev 611 : Merge
*** 1,10 ****
#ifdef USE_PRAGMA_IDENT_HDR
#pragma ident "@(#)c1_ValueMap.hpp 1.22 07/05/05 17:05:07 JVM"
#endif
/*
! * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,10 ----
#ifdef USE_PRAGMA_IDENT_HDR
#pragma ident "@(#)c1_ValueMap.hpp 1.22 07/05/05 17:05:07 JVM"
#endif
/*
! * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 134,190 ****
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:
--- 134,214 ----
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: