8214057: GC/C2 abstraction for Node::has_special_unique_user()
authorrkennke
Thu, 22 Nov 2018 09:23:05 +0100
changeset 52655 c88468bc7690
parent 52654 95ce45e0249f
child 52656 11b97acc9c7f
8214057: GC/C2 abstraction for Node::has_special_unique_user() Reviewed-by: kvn, roland
src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
src/hotspot/share/opto/node.cpp
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp	Thu Nov 22 09:22:54 2018 +0100
+++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp	Thu Nov 22 09:23:05 2018 +0100
@@ -281,6 +281,8 @@
   // expanded later, then now is the time to do so.
   virtual bool expand_macro_nodes(PhaseMacroExpand* macro) const { return false; }
 
+  virtual bool has_special_unique_user(const Node* node) const { return false; }
+
   enum CompilePhase {
     BeforeOptimize, /* post_parse = true */
     BeforeExpand, /* post_parse = false */
--- a/src/hotspot/share/opto/node.cpp	Thu Nov 22 09:22:54 2018 +0100
+++ b/src/hotspot/share/opto/node.cpp	Thu Nov 22 09:23:05 2018 +0100
@@ -1142,8 +1142,9 @@
   } else if (is_If() && (n->is_IfFalse() || n->is_IfTrue())) {
     // See IfProjNode::Identity()
     return true;
+  } else {
+    return BarrierSet::barrier_set()->barrier_set_c2()->has_special_unique_user(this);
   }
-  return false;
 };
 
 //--------------------------find_exact_control---------------------------------