changeset 56477:8f3fcb9251d1

8229219: C2 compilation fails with assert: Bad graph detected in build_loop_late Summary: Backed out JDK-8173196. Reviewed-by: shade, rbackman
author thartmann
date Thu, 08 Aug 2019 07:05:17 +0200
parents 8b104d8b27fd
children 36a842b472e8
files src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp src/hotspot/share/gc/shared/c2/cardTableBarrierSetC2.cpp src/hotspot/share/opto/graphKit.cpp src/hotspot/share/opto/graphKit.hpp
diffstat 4 files changed, 2 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp	Thu Aug 08 03:08:49 2019 +0200
+++ b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp	Thu Aug 08 07:05:17 2019 +0200
@@ -472,7 +472,7 @@
 
         __ if_then(card_val, BoolTest::ne, young_card); {
           kit->sync_kit(ideal);
-          kit->insert_store_load_for_barrier();
+          kit->insert_mem_bar(Op_MemBarVolatile, oop_store);
           __ sync_kit(kit);
 
           Node* card_val_reload = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
--- a/src/hotspot/share/gc/shared/c2/cardTableBarrierSetC2.cpp	Thu Aug 08 03:08:49 2019 +0200
+++ b/src/hotspot/share/gc/shared/c2/cardTableBarrierSetC2.cpp	Thu Aug 08 07:05:17 2019 +0200
@@ -105,7 +105,7 @@
 
   if (UseCondCardMark) {
     if (ct->scanned_concurrently()) {
-      kit->insert_store_load_for_barrier();
+      kit->insert_mem_bar(Op_MemBarVolatile, oop_store);
       __ sync_kit(kit);
     }
     // The classic GC reference write barrier is typically implemented
--- a/src/hotspot/share/opto/graphKit.cpp	Thu Aug 08 03:08:49 2019 +0200
+++ b/src/hotspot/share/opto/graphKit.cpp	Thu Aug 08 07:05:17 2019 +0200
@@ -3306,18 +3306,6 @@
   return membar;
 }
 
-void GraphKit::insert_store_load_for_barrier() {
-  Node* mem = reset_memory();
-  MemBarNode* mb = MemBarNode::make(C, Op_MemBarVolatile, Compile::AliasIdxRaw);
-  mb->init_req(TypeFunc::Control, control());
-  mb->init_req(TypeFunc::Memory, mem);
-  Node* membar = _gvn.transform(mb);
-  set_control(_gvn.transform(new ProjNode(membar, TypeFunc::Control)));
-  Node* newmem = _gvn.transform(new ProjNode(membar, TypeFunc::Memory));
-  set_all_memory(mem);
-  set_memory(newmem, Compile::AliasIdxRaw);
-}
-
 //------------------------------shared_lock------------------------------------
 // Emit locking code.
 FastLockNode* GraphKit::shared_lock(Node* obj) {
--- a/src/hotspot/share/opto/graphKit.hpp	Thu Aug 08 03:08:49 2019 +0200
+++ b/src/hotspot/share/opto/graphKit.hpp	Thu Aug 08 07:05:17 2019 +0200
@@ -811,7 +811,6 @@
   int next_monitor();
   Node* insert_mem_bar(int opcode, Node* precedent = NULL);
   Node* insert_mem_bar_volatile(int opcode, int alias_idx, Node* precedent = NULL);
-  void insert_store_load_for_barrier();
   // Optional 'precedent' is appended as an extra edge, to force ordering.
   FastLockNode* shared_lock(Node* obj);
   void shared_unlock(Node* box, Node* obj);