8071282: remove misc dead code
authorrraghavan
Wed, 14 Mar 2018 09:09:38 -0700
changeset 49397 d3a8aa01f26f
parent 49396 647ee5457fd1
child 49398 fdf3f14be8b2
8071282: remove misc dead code Summary: cleanup of dead code done Reviewed-by: kvn, thartmann
src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp
src/hotspot/cpu/arm/frame_arm.inline.hpp
src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp
src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp
src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp
src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp
src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp
src/hotspot/cpu/sparc/c1_MacroAssembler_sparc.cpp
src/hotspot/cpu/sparc/frame_sparc.inline.hpp
src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp
src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp
src/hotspot/cpu/x86/frame_x86.inline.hpp
src/hotspot/share/c1/c1_LIRGenerator.hpp
src/hotspot/share/c1/c1_MacroAssembler.hpp
src/hotspot/share/runtime/frame.hpp
--- a/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -213,10 +213,6 @@
   return (oop *)(fp() + interpreter_frame_oop_temp_offset);
 }
 
-inline int frame::pd_oop_map_offset_adjustment() const {
-  return 0;
-}
-
 inline int frame::interpreter_frame_monitor_size() {
   return BasicObjectLock::size();
 }
@@ -243,24 +239,6 @@
 
 // Compiled frames
 
-inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
-  return (nof_args - local_index + (local_index < nof_args ? 1: -1));
-}
-
-inline int frame::monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
-  return local_offset_for_compiler(local_index, nof_args, max_nof_locals, max_nof_monitors);
-}
-
-inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) {
-  return (nof_args - (max_nof_locals + max_nof_monitors*2) - 1);
-}
-
-inline bool frame::volatile_across_calls(Register reg) {
-  return true;
-}
-
-
-
 inline oop frame::saved_oop_result(RegisterMap* map) const {
   oop* result_adr = (oop *)map->location(r0->as_VMReg());
   guarantee(result_adr != NULL, "bad register save location");
--- a/src/hotspot/cpu/arm/frame_arm.inline.hpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/arm/frame_arm.inline.hpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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
@@ -230,10 +230,6 @@
 
 // Compiled frames
 
-inline bool frame::volatile_across_calls(Register reg) {
-  return true;
-}
-
 inline oop frame::saved_oop_result(RegisterMap* map) const {
   oop* result_adr = (oop*) map->location(R0->as_VMReg());
   guarantee(result_adr != NULL, "bad register save location");
--- a/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2017, SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -289,14 +289,6 @@
 }
 
 
-void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base,
-                               LIR_Opr disp, BasicType type, CodeEmitInfo* info) {
-  LIR_Opr tmp = FrameMap::R0_opr;
-  __ load(new LIR_Address(base, disp, type), tmp, info);
-  __ cmp(condition, reg, tmp);
-}
-
-
 bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, int c, LIR_Opr result, LIR_Opr tmp) {
   assert(left != result, "should be different registers");
   if (is_power_of_2(c + 1)) {
--- a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp	Wed Mar 14 09:09:38 2018 -0700
@@ -83,13 +83,6 @@
 }
 
 
-void C1_MacroAssembler::unverified_entry(Register receiver, Register ic_klass) {
-  Unimplemented(); // Currently unused.
-  //if (C1Breakpoint) illtrap();
-  //inline_cache_check(receiver, ic_klass);
-}
-
-
 void C1_MacroAssembler::verified_entry() {
   if (C1Breakpoint) illtrap();
   // build frame
--- a/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/s390/c1_LIRGenerator_s390.cpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2016, 2017, SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -226,10 +226,6 @@
   __ cmp_reg_mem(condition, reg, new LIR_Address(base, disp, type), info);
 }
 
-void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, LIR_Opr disp, BasicType type, CodeEmitInfo* info) {
-  __ cmp_reg_mem(condition, reg, new LIR_Address(base, disp, type), info);
-}
-
 bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, int c, LIR_Opr result, LIR_Opr tmp) {
   if (tmp->is_valid()) {
     if (is_power_of_2(c + 1)) {
--- a/src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -73,10 +73,6 @@
   push_frame(frame_size_in_bytes);
 }
 
-void C1_MacroAssembler::unverified_entry(Register receiver, Register ic_klass) {
-  ShouldNotCallThis(); // unused
-}
-
 void C1_MacroAssembler::verified_entry() {
   if (C1Breakpoint) z_illtrap(0xC1);
 }
--- a/src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/sparc/c1_LIRGenerator_sparc.cpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, 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
@@ -285,13 +285,6 @@
 }
 
 
-void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, LIR_Opr disp, BasicType type, CodeEmitInfo* info) {
-  LIR_Opr o7opr = FrameMap::O7_opr;
-  __ load(new LIR_Address(base, disp, type), o7opr, info);
-  __ cmp(condition, reg, o7opr);
-}
-
-
 bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, int c, LIR_Opr result, LIR_Opr tmp) {
   assert(left != result, "should be different registers");
   if (is_power_of_2(c + 1)) {
--- a/src/hotspot/cpu/sparc/c1_MacroAssembler_sparc.cpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/sparc/c1_MacroAssembler_sparc.cpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -64,12 +64,6 @@
 }
 
 
-void C1_MacroAssembler::unverified_entry(Register receiver, Register ic_klass) {
-  if (C1Breakpoint) breakpoint_trap();
-  inline_cache_check(receiver, ic_klass);
-}
-
-
 void C1_MacroAssembler::verified_entry() {
   if (C1Breakpoint) breakpoint_trap();
   // build frame
--- a/src/hotspot/cpu/sparc/frame_sparc.inline.hpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/sparc/frame_sparc.inline.hpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -86,12 +86,6 @@
 
 inline intptr_t* frame::real_fp() const { return fp(); }
 
-// Used only in frame::oopmapreg_to_location
-// This return a value in VMRegImpl::slot_size
-inline int frame::pd_oop_map_offset_adjustment() const {
-  return _sp_adjustment_by_callee * VMRegImpl::slots_per_word;
-}
-
 inline intptr_t** frame::interpreter_frame_locals_addr() const {
   return (intptr_t**) sp_addr_at( Llocals->sp_offset_in_saved_window());
 }
@@ -191,61 +185,6 @@
 }
 
 
-inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
-   // always allocate non-argument locals 0..5 as if they were arguments:
-  int allocated_above_frame = nof_args;
-  if (allocated_above_frame < callee_register_argument_save_area_words)
-    allocated_above_frame = callee_register_argument_save_area_words;
-  if (allocated_above_frame > max_nof_locals)
-    allocated_above_frame = max_nof_locals;
-
-  // Note: monitors (BasicLock blocks) are never allocated in argument slots
-  //assert(local_index >= 0 && local_index < max_nof_locals, "bad local index");
-  if (local_index < allocated_above_frame)
-    return local_index + callee_register_argument_save_area_sp_offset;
-  else
-    return local_index - (max_nof_locals + max_nof_monitors*2) + compiler_frame_vm_locals_fp_offset;
-}
-
-inline int frame::monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
-  assert(local_index >= max_nof_locals && ((local_index - max_nof_locals) & 1) && (local_index - max_nof_locals) < max_nof_monitors*2, "bad monitor index");
-
-  // The compiler uses the __higher__ of two indexes allocated to the monitor.
-  // Increasing local indexes are mapped to increasing memory locations,
-  // so the start of the BasicLock is associated with the __lower__ index.
-
-  int offset = (local_index-1) - (max_nof_locals + max_nof_monitors*2) + compiler_frame_vm_locals_fp_offset;
-
-  // We allocate monitors aligned zero mod 8:
-  assert((offset & 1) == 0, "monitor must be an an even address.");
-  // This works because all monitors are allocated after
-  // all locals, and because the highest address corresponding to any
-  // monitor index is always even.
-  assert((compiler_frame_vm_locals_fp_offset & 1) == 0, "end of monitors must be even address");
-
-  return offset;
-}
-
-inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) {
-   // always allocate non-argument locals 0..5 as if they were arguments:
-  int allocated_above_frame = nof_args;
-  if (allocated_above_frame < callee_register_argument_save_area_words)
-    allocated_above_frame = callee_register_argument_save_area_words;
-  if (allocated_above_frame > max_nof_locals)
-    allocated_above_frame = max_nof_locals;
-
-  int allocated_in_frame = (max_nof_locals + max_nof_monitors*2) - allocated_above_frame;
-
-  return compiler_frame_vm_locals_fp_offset - allocated_in_frame;
-}
-
-// On SPARC, the %lN and %iN registers are non-volatile.
-inline bool frame::volatile_across_calls(Register reg) {
-  // This predicate is (presently) applied only to temporary registers,
-  // and so it need not recognize non-volatile globals.
-  return reg->is_out() || reg->is_global();
-}
-
 inline oop  frame::saved_oop_result(RegisterMap* map) const      {
   return *((oop*) map->location(O0->as_VMReg()));
 }
--- a/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp	Wed Mar 14 09:09:38 2018 -0700
@@ -230,11 +230,6 @@
 }
 
 
-void LIRGenerator::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, LIR_Opr disp, BasicType type, CodeEmitInfo* info) {
-  __ cmp_reg_mem(condition, reg, new LIR_Address(base, disp, type), info);
-}
-
-
 bool LIRGenerator::strength_reduce_multiply(LIR_Opr left, jint c, LIR_Opr result, LIR_Opr tmp) {
   if (tmp->is_valid() && c > 0 && c < max_jint) {
     if (is_power_of_2(c + 1)) {
--- a/src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -340,12 +340,6 @@
 }
 
 
-void C1_MacroAssembler::unverified_entry(Register receiver, Register ic_klass) {
-  if (C1Breakpoint) int3();
-  inline_cache_check(receiver, ic_klass);
-}
-
-
 void C1_MacroAssembler::verified_entry() {
   if (C1Breakpoint || VerifyFPU || !UseStackBanging) {
     // Verified Entry first instruction should be 5 bytes long for correct
--- a/src/hotspot/cpu/x86/frame_x86.inline.hpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/cpu/x86/frame_x86.inline.hpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -210,10 +210,6 @@
   return (oop *)(fp() + interpreter_frame_oop_temp_offset);
 }
 
-inline int frame::pd_oop_map_offset_adjustment() const {
-  return 0;
-}
-
 inline int frame::interpreter_frame_monitor_size() {
   return BasicObjectLock::size();
 }
@@ -239,22 +235,6 @@
 
 // Compiled frames
 
-inline int frame::local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
-  return (nof_args - local_index + (local_index < nof_args ? 1: -1));
-}
-
-inline int frame::monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors) {
-  return local_offset_for_compiler(local_index, nof_args, max_nof_locals, max_nof_monitors);
-}
-
-inline int frame::min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors) {
-  return (nof_args - (max_nof_locals + max_nof_monitors*2) - 1);
-}
-
-inline bool frame::volatile_across_calls(Register reg) {
-  return true;
-}
-
 inline oop frame::saved_oop_result(RegisterMap* map) const {
   oop* result_adr = (oop *)map->location(rax->as_VMReg());
   guarantee(result_adr != NULL, "bad register save location");
--- a/src/hotspot/share/c1/c1_LIRGenerator.hpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/share/c1/c1_LIRGenerator.hpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, 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
@@ -340,7 +340,6 @@
   // machine dependent
   void cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info);
   void cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, int disp, BasicType type, CodeEmitInfo* info);
-  void cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Opr base, LIR_Opr disp, BasicType type, CodeEmitInfo* info);
 
   void arraycopy_helper(Intrinsic* x, int* flags, ciArrayKlass** expected_type);
 
--- a/src/hotspot/share/c1/c1_MacroAssembler.hpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/share/c1/c1_MacroAssembler.hpp	Wed Mar 14 09:09:38 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -43,7 +43,6 @@
   void build_frame(int frame_size_in_bytes, int bang_size_in_bytes);
   void remove_frame(int frame_size_in_bytes);
 
-  void unverified_entry(Register receiver, Register ic_klass);
   void verified_entry();
   void verify_stack_oop(int offset) PRODUCT_RETURN;
   void verify_not_null_oop(Register r)  PRODUCT_RETURN;
--- a/src/hotspot/share/runtime/frame.hpp	Wed Mar 14 15:28:31 2018 +0100
+++ b/src/hotspot/share/runtime/frame.hpp	Wed Mar 14 09:09:38 2018 -0700
@@ -337,33 +337,6 @@
   // tells whether there is another chunk of Delta stack above
   bool entry_frame_is_first() const;
 
-  // Compiled frames:
-
- public:
-  // Given the index of a local, and the number of argument words
-  // in this stack frame, tell which word of the stack frame to find
-  // the local in.  Arguments are stored above the ofp/rpc pair,
-  // while other locals are stored below it.
-  // Since monitors (BasicLock blocks) are also assigned indexes,
-  // but may have different storage requirements, their presence
-  // can also affect the calculation of offsets.
-  static int local_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors);
-
-  // Given the index of a monitor, etc., tell which word of the
-  // stack frame contains the start of the BasicLock block.
-  // Note that the local index by convention is the __higher__
-  // of the two indexes allocated to the block.
-  static int monitor_offset_for_compiler(int local_index, int nof_args, int max_nof_locals, int max_nof_monitors);
-
-  // Tell the smallest value that local_offset_for_compiler will attain.
-  // This is used to help determine how much stack frame to allocate.
-  static int min_local_offset_for_compiler(int nof_args, int max_nof_locals, int max_nof_monitors);
-
-  // Tells if this register must be spilled during a call.
-  // On Intel, all registers are smashed by calls.
-  static bool volatile_across_calls(Register reg);
-
-
   // Safepoints
 
  public:
@@ -416,8 +389,6 @@
   // Usage:
   // assert(frame::verify_return_pc(return_address), "must be a return pc");
 
-  int pd_oop_map_offset_adjustment() const;
-
   NOT_PRODUCT(void pd_ps();)  // platform dependent frame printing
 
 #include CPU_HEADER(frame)