hotspot/src/share/vm/opto/matcher.hpp
changeset 768 d0bebc7eefc2
parent 762 1b26adb5fea1
child 781 e1baa9c8f16f
--- a/hotspot/src/share/vm/opto/matcher.hpp	Tue Jun 24 10:43:29 2008 -0700
+++ b/hotspot/src/share/vm/opto/matcher.hpp	Tue Jun 24 16:00:14 2008 -0700
@@ -84,6 +84,7 @@
   Node_Array _shared_nodes;
 
   debug_only(Node_Array _old2new_map;)   // Map roots of ideal-trees to machine-roots
+  debug_only(Node_Array _new2old_map;)   // Maps machine nodes back to ideal
 
   // Accessors for the inherited field PhaseTransform::_nodes:
   void   grow_new_node_array(uint idx_limit) {
@@ -390,5 +391,9 @@
 
 #ifdef ASSERT
   void dump_old2new_map();      // machine-independent to machine-dependent
+
+  Node* find_old_node(Node* new_node) {
+    return _new2old_map[new_node->_idx];
+  }
 #endif
 };