changeset 54874:70f114974aa7

8217383: Obsolete UseImplicitStableValues Reviewed-by: shade, rkennke, vlivanov
author redestad
date Tue, 12 Feb 2019 09:00:04 +0100
parents f31dad87f661
children 43854454a7db
files src/hotspot/share/opto/c2_globals.hpp src/hotspot/share/opto/graphKit.cpp src/hotspot/share/opto/graphKit.hpp src/hotspot/share/runtime/arguments.cpp
diffstat 4 files changed, 2 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/c2_globals.hpp	Wed Feb 06 16:02:27 2019 +0100
+++ b/src/hotspot/share/opto/c2_globals.hpp	Tue Feb 12 09:00:04 2019 +0100
@@ -509,9 +509,6 @@
   product(bool, EliminateAutoBox, true,                                     \
           "Control optimizations for autobox elimination")                  \
                                                                             \
-  diagnostic(bool, UseImplicitStableValues, true,                           \
-          "Mark well-known stable fields as such (e.g. String.value)")      \
-                                                                            \
   product(intx, AutoBoxCacheMax, 128,                                       \
           "Sets max value cached by the java.lang.Integer autobox cache")   \
           range(0, max_jint)                                                \
--- a/src/hotspot/share/opto/graphKit.cpp	Wed Feb 06 16:02:27 2019 +0100
+++ b/src/hotspot/share/opto/graphKit.cpp	Tue Feb 12 09:00:04 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3886,10 +3886,6 @@
   Node* p = basic_plus_adr(str, str, value_offset);
   Node* load = access_load_at(str, p, value_field_type, value_type, T_OBJECT,
                               IN_HEAP | (set_ctrl ? C2_CONTROL_DEPENDENT_LOAD : 0) | MO_UNORDERED);
-  // String.value field is known to be @Stable.
-  if (UseImplicitStableValues) {
-    load = cast_array_to_stable(load, value_type);
-  }
   return load;
 }
 
@@ -3901,7 +3897,6 @@
   const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(),
                                                      false, NULL, 0);
   const TypePtr* coder_field_type = string_type->add_offset(coder_offset);
-  int coder_field_idx = C->get_alias_index(coder_field_type);
 
   Node* p = basic_plus_adr(str, str, coder_offset);
   Node* load = access_load_at(str, p, coder_field_type, TypeInt::BYTE, T_BYTE,
@@ -4039,9 +4034,3 @@
   }
   return NULL;
 }
-
-Node* GraphKit::cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type) {
-  // Reify the property as a CastPP node in Ideal graph to comply with monotonicity
-  // assumption of CCP analysis.
-  return _gvn.transform(new CastPPNode(ary, ary_type->cast_to_stable(true)));
-}
--- a/src/hotspot/share/opto/graphKit.hpp	Wed Feb 06 16:02:27 2019 +0100
+++ b/src/hotspot/share/opto/graphKit.hpp	Tue Feb 12 09:00:04 2019 +0100
@@ -884,9 +884,6 @@
   void add_predicate_impl(Deoptimization::DeoptReason reason, int nargs);
 
   Node* make_constant_from_field(ciField* field, Node* obj);
-
-  // Produce new array node of stable type
-  Node* cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type);
 };
 
 // Helper class to support building of control flow branches. Upon
--- a/src/hotspot/share/runtime/arguments.cpp	Wed Feb 06 16:02:27 2019 +0100
+++ b/src/hotspot/share/runtime/arguments.cpp	Tue Feb 12 09:00:04 2019 +0100
@@ -541,6 +541,7 @@
   { "SharedReadOnlySize",            JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
   { "SharedMiscDataSize",            JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
   { "SharedMiscCodeSize",            JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
+  { "UseImplicitStableValues",       JDK_Version::undefined(), JDK_Version::jdk(13), JDK_Version::jdk(14) },
 
 #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
   { "dep > obs",                    JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },