changeset 53680:d17e09494308

8214362: C2: gc interface entry point for split if Reviewed-by: rkennke, thartmann
author roland
date Tue, 27 Nov 2018 14:49:13 +0100
parents f480ad035c73
children 8586613959f0
files src/hotspot/share/gc/shared/c2/barrierSetC2.hpp src/hotspot/share/opto/loopopts.cpp
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp	Tue Nov 27 09:35:02 2018 +0100
+++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp	Tue Nov 27 14:49:13 2018 +0100
@@ -60,8 +60,8 @@
 class GraphKit;
 class IdealKit;
 class Node;
+class PhaseGVN;
 class PhaseIdealLoop;
-class PhaseGVN;
 class PhaseMacroExpand;
 class Type;
 class TypePtr;
@@ -313,6 +313,7 @@
   virtual void igvn_add_users_to_worklist(PhaseIterGVN* igvn, Node* use) const {}
   virtual void ccp_analyze(PhaseCCP* ccp, Unique_Node_List& worklist, Node* use) const {}
 
+  virtual Node* split_if_pre(PhaseIdealLoop* phase, Node* n) const { return NULL; }
 };
 
 #endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP
--- a/src/hotspot/share/opto/loopopts.cpp	Tue Nov 27 09:35:02 2018 +0100
+++ b/src/hotspot/share/opto/loopopts.cpp	Tue Nov 27 14:49:13 2018 +0100
@@ -887,6 +887,11 @@
 // Do the real work in a non-recursive function.  Data nodes want to be
 // cloned in the pre-order so they can feed each other nicely.
 Node *PhaseIdealLoop::split_if_with_blocks_pre( Node *n ) {
+  BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+  Node* bs_res = bs->split_if_pre(this, n);
+  if (bs_res != NULL) {
+    return bs_res;
+  }
   // Cloning these guys is unlikely to win
   int n_op = n->Opcode();
   if( n_op == Op_MergeMem ) return n;