hotspot/src/share/vm/opto/phaseX.hpp
changeset 35545 a8f29dfd62b2
parent 34503 57d1a0e76091
child 36309 61fbc15c4d23
--- a/hotspot/src/share/vm/opto/phaseX.hpp	Fri Dec 18 20:23:28 2015 +0300
+++ b/hotspot/src/share/vm/opto/phaseX.hpp	Fri Dec 11 16:57:08 2015 +0100
@@ -330,6 +330,9 @@
   // Delayed node rehash if this is an IGVN phase
   virtual void igvn_rehash_node_delayed(Node* n) {}
 
+  // true if CFG node d dominates CFG node n
+  virtual bool is_dominator(Node *d, Node *n) { fatal("unimplemented for this pass"); return false; };
+
 #ifndef PRODUCT
   void dump_old2new_map() const;
   void dump_new( uint new_lidx ) const;
@@ -397,6 +400,9 @@
 //------------------------------PhaseGVN---------------------------------------
 // Phase for performing local, pessimistic GVN-style optimizations.
 class PhaseGVN : public PhaseValues {
+protected:
+  bool is_dominator_helper(Node *d, Node *n, bool linear_only);
+
 public:
   PhaseGVN( Arena *arena, uint est_max_size ) : PhaseValues( arena, est_max_size ) {}
   PhaseGVN( PhaseGVN *gvn ) : PhaseValues( gvn ) {}
@@ -415,6 +421,8 @@
     _types = gvn->_types;
   }
 
+  bool is_dominator(Node *d, Node *n) { return is_dominator_helper(d, n, true); }
+
   // Check for a simple dead loop when a data node references itself.
   DEBUG_ONLY(void dead_loop_check(Node *n);)
 };
@@ -545,6 +553,8 @@
     _table.check_no_speculative_types();
   }
 
+  bool is_dominator(Node *d, Node *n) { return is_dominator_helper(d, n, false); }
+
 #ifndef PRODUCT
 protected:
   // Sub-quadratic implementation of VerifyIterativeGVN.