# HG changeset patch # User rkennke # Date 1542792754 -3600 # Wed Nov 21 10:32:34 2018 +0100 # Node ID 94128cf36bbc7e48c51cb780085a4cb95eccdcdc # Parent e7d8ea5bfc8fd92c63096eeb402ab7f1a90affd6 8214057: GC/C2 abstraction for Node::has_special_unique_user() diff --git a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp --- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp +++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp @@ -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 */ diff --git a/src/hotspot/share/opto/node.cpp b/src/hotspot/share/opto/node.cpp --- a/src/hotspot/share/opto/node.cpp +++ b/src/hotspot/share/opto/node.cpp @@ -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---------------------------------