changeset 37291:f13632a2a389

8151724: Remove -XX:GenerateCompilerNullChecks Summary: Removed the broken GenerateCompilerNullChecks flag. Reviewed-by: zmajo, kvn
author thartmann
date Tue, 05 Apr 2016 17:51:44 +0200
parents 8604d4659cee
children 64f6ae06310e
files hotspot/src/share/vm/c1/c1_LIRAssembler.cpp hotspot/src/share/vm/c1/c1_LIRGenerator.cpp hotspot/src/share/vm/opto/graphKit.cpp hotspot/src/share/vm/runtime/globals.hpp
diffstat 4 files changed, 8 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Tue Apr 05 10:11:07 2016 +0000
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp	Tue Apr 05 17:51:44 2016 +0200
@@ -556,17 +556,16 @@
       leal(op->in_opr(), op->result_opr());
       break;
 
-    case lir_null_check:
-      if (GenerateCompilerNullChecks) {
-        ImplicitNullCheckStub* stub = add_debug_info_for_null_check_here(op->info());
+    case lir_null_check: {
+      ImplicitNullCheckStub* stub = add_debug_info_for_null_check_here(op->info());
 
-        if (op->in_opr()->is_single_cpu()) {
-          _masm->null_check(op->in_opr()->as_register(), stub->entry());
-        } else {
-          Unimplemented();
-        }
+      if (op->in_opr()->is_single_cpu()) {
+        _masm->null_check(op->in_opr()->as_register(), stub->entry());
+      } else {
+        Unimplemented();
       }
       break;
+    }
 
     case lir_monaddr:
       monitor_address(op->in_opr()->as_constant_ptr()->as_jint(), op->result_opr());
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Tue Apr 05 10:11:07 2016 +0000
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Tue Apr 05 17:51:44 2016 +0200
@@ -2041,8 +2041,7 @@
   // to avoid a fixed interval with an oop during the null check.
   // Use a copy of the CodeEmitInfo because debug information is
   // different for null_check and throw.
-  if (GenerateCompilerNullChecks &&
-      (x->exception()->as_NewInstance() == NULL && x->exception()->as_ExceptionObject() == NULL)) {
+  if (x->exception()->as_NewInstance() == NULL && x->exception()->as_ExceptionObject() == NULL) {
     // if the exception object wasn't created using new then it might be null.
     __ null_check(exception_opr, new CodeEmitInfo(info, x->state()->copy(ValueStack::ExceptionState, x->state()->bci())));
   }
--- a/hotspot/src/share/vm/opto/graphKit.cpp	Tue Apr 05 10:11:07 2016 +0000
+++ b/hotspot/src/share/vm/opto/graphKit.cpp	Tue Apr 05 17:51:44 2016 +0200
@@ -1190,11 +1190,6 @@
                                   bool speculative) {
   assert(!assert_null || null_control == NULL, "not both at once");
   if (stopped())  return top();
-  if (!GenerateCompilerNullChecks && !assert_null && null_control == NULL) {
-    // For some performance testing, we may wish to suppress null checking.
-    value = cast_not_null(value);   // Make it appear to be non-null (4962416).
-    return value;
-  }
   NOT_PRODUCT(explicit_null_checks_inserted++);
 
   // Construct NULL check
--- a/hotspot/src/share/vm/runtime/globals.hpp	Tue Apr 05 10:11:07 2016 +0000
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Tue Apr 05 17:51:44 2016 +0200
@@ -2516,9 +2516,6 @@
           "generate locking/unlocking code for synchronized methods and "   \
           "monitors")                                                       \
                                                                             \
-  develop(bool, GenerateCompilerNullChecks, true,                           \
-          "Generate explicit null checks for loads/stores/calls")           \
-                                                                            \
   develop(bool, GenerateRangeChecks, true,                                  \
           "Generate range checks for array accesses")                       \
                                                                             \