8217922: Compiler dead code removal
authorredestad
Tue, 29 Jan 2019 14:34:26 +0100
changeset 53546 63eb7e38ce84
parent 53545 2c38991dd9b0
child 53547 9d1a788dea3d
8217922: Compiler dead code removal Reviewed-by: thartmann, neliasso
src/hotspot/cpu/x86/stubGenerator_x86_32.cpp
src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
src/hotspot/share/ci/ciArray.hpp
src/hotspot/share/ci/ciCallProfile.hpp
src/hotspot/share/ci/ciCallSite.cpp
src/hotspot/share/ci/ciCallSite.hpp
src/hotspot/share/ci/ciMethodData.cpp
src/hotspot/share/ci/ciMethodData.hpp
src/hotspot/share/ci/ciNullObject.hpp
src/hotspot/share/ci/ciObject.hpp
src/hotspot/share/ci/ciStreams.cpp
src/hotspot/share/ci/ciStreams.hpp
src/hotspot/share/ci/ciTypeFlow.cpp
src/hotspot/share/ci/ciTypeFlow.hpp
src/hotspot/share/ci/ciUtilities.cpp
src/hotspot/share/ci/ciUtilities.hpp
src/hotspot/share/interpreter/invocationCounter.cpp
src/hotspot/share/interpreter/invocationCounter.hpp
src/hotspot/share/libadt/set.cpp
src/hotspot/share/libadt/set.hpp
src/hotspot/share/libadt/vectset.cpp
src/hotspot/share/libadt/vectset.hpp
src/hotspot/share/oops/compiledICHolder.hpp
src/hotspot/share/runtime/deoptimization.cpp
src/hotspot/share/runtime/deoptimization.hpp
src/hotspot/share/runtime/stubRoutines.cpp
src/hotspot/share/runtime/stubRoutines.hpp
src/hotspot/share/utilities/bitMap.hpp
--- a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -3709,8 +3709,6 @@
     // Round to nearest, 24-bit mode, exceptions masked
     StubRoutines::_fpu_cntrl_wrd_24    = 0x007F;
     // Round to nearest, 64-bit mode, exceptions masked
-    StubRoutines::_fpu_cntrl_wrd_64    = 0x037F;
-    // Round to nearest, 64-bit mode, exceptions masked
     StubRoutines::_mxcsr_std           = 0x1F80;
     // Note: the following two constants are 80-bit values
     //       layout is critical for correct loading by FPU.
--- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -5721,8 +5721,6 @@
     // Round to nearest, 24-bit mode, exceptions masked
     StubRoutines::_fpu_cntrl_wrd_24    = 0x007F;
     // Round to nearest, 64-bit mode, exceptions masked
-    StubRoutines::_fpu_cntrl_wrd_64    = 0x037F;
-    // Round to nearest, 64-bit mode, exceptions masked
     StubRoutines::_mxcsr_std           = 0x1F80;
     // Note: the following two constants are 80-bit values
     //       layout is critical for correct loading by FPU.
--- a/src/hotspot/share/ci/ciArray.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciArray.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -73,7 +73,6 @@
 
   // What kind of ciObject is this?
   bool is_array()        { return true; }
-  bool is_java_object()  { return true; }
 };
 
 #endif // SHARE_CI_CIARRAY_HPP
--- a/src/hotspot/share/ci/ciCallProfile.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciCallProfile.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -79,17 +79,6 @@
     assert(i < _limit, "out of Call Profile MorphismLimit");
     return _receiver[i];
   }
-
-  // Rescale the current profile based on the incoming scale
-  ciCallProfile rescale(double scale) {
-    assert(scale >= 0 && scale <= 1.0, "out of range");
-    ciCallProfile call = *this;
-    call._count = (int)(call._count * scale);
-    for (int i = 0; i < _morphism; i++) {
-      call._receiver_count[i] = (int)(call._receiver_count[i] * scale);
-    }
-    return call;
-  }
 };
 
 #endif // SHARE_CI_CICALLPROFILE_HPP
--- a/src/hotspot/share/ci/ciCallSite.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciCallSite.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -32,12 +32,6 @@
 bool ciCallSite::is_constant_call_site() {
   return klass()->is_subclass_of(CURRENT_ENV->ConstantCallSite_klass());
 }
-bool ciCallSite::is_mutable_call_site() {
-  return klass()->is_subclass_of(CURRENT_ENV->MutableCallSite_klass());
-}
-bool ciCallSite::is_volatile_call_site() {
-  return klass()->is_subclass_of(CURRENT_ENV->VolatileCallSite_klass());
-}
 
 // ------------------------------------------------------------------
 // ciCallSite::get_target
--- a/src/hotspot/share/ci/ciCallSite.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciCallSite.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -38,8 +38,6 @@
   bool is_call_site() const { return true; }
 
   bool is_constant_call_site();
-  bool is_mutable_call_site();
-  bool is_volatile_call_site();
 
   // Return the target MethodHandle of this CallSite.
   ciMethodHandle* get_target() const;
--- a/src/hotspot/share/ci/ciMethodData.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciMethodData.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2017, 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
@@ -537,10 +537,6 @@
   set_bits(_eflags, f);
 }
 
-void ciMethodData::clear_eflag(MethodData::EscapeFlag f) {
-  clear_bits(_eflags, f);
-}
-
 bool ciMethodData::eflag_set(MethodData::EscapeFlag f) const {
   return mask_bits(_eflags, f) != 0;
 }
--- a/src/hotspot/share/ci/ciMethodData.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciMethodData.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -271,11 +271,6 @@
     }
   }
 
-  intptr_t argument_type(int i) const {
-    assert(has_arguments(), "no arg type profiling data");
-    return args()->type(i);
-  }
-
   ciKlass* valid_argument_type(int i) const {
     assert(has_arguments(), "no arg type profiling data");
     return args()->valid_type(i);
@@ -315,11 +310,6 @@
   ciBranchData(DataLayout* layout) : BranchData(layout) {};
 };
 
-class ciArrayData : public ArrayData {
-public:
-  ciArrayData(DataLayout* layout) : ArrayData(layout) {};
-};
-
 class ciMultiBranchData : public MultiBranchData {
 public:
   ciMultiBranchData(DataLayout* layout) : MultiBranchData(layout) {};
@@ -471,10 +461,6 @@
 
   ciArgInfoData *arg_info() const;
 
-  address data_base() const {
-    return (address) _data;
-  }
-
   void prepare_metadata();
   void load_extra_data();
   ciProfileData* bci_to_extra_data(int bci, ciMethod* m, bool& two_free_slots);
@@ -574,7 +560,6 @@
   void update_escape_info();
 
   void set_eflag(MethodData::EscapeFlag f);
-  void clear_eflag(MethodData::EscapeFlag f);
   bool eflag_set(MethodData::EscapeFlag f) const;
 
   void set_arg_local(int i);
--- a/src/hotspot/share/ci/ciNullObject.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciNullObject.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -42,9 +42,6 @@
   void print_impl(outputStream* st);
 
 public:
-  // Is this ciObject a Java Language Object?  That is,
-  // is the ciObject an instance or an array
-  bool is_java_object() { return true; }
 
   // What kind of ciObject is this?
   bool is_null_object() const { return true; }
--- a/src/hotspot/share/ci/ciObject.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciObject.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -115,7 +115,6 @@
   // What kind of ciObject is this?
   virtual bool is_null_object()       const { return false; }
   virtual bool is_call_site()         const { return false; }
-  virtual bool is_cpcache()           const { return false; }
   virtual bool is_instance()                { return false; }
   virtual bool is_member_name()       const { return false; }
   virtual bool is_method_handle()     const { return false; }
--- a/src/hotspot/share/ci/ciStreams.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciStreams.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -224,14 +224,6 @@
 }
 
 // ------------------------------------------------------------------
-// ciBytecodeStream::get_constant_cache_index
-// Return the CP cache index, or -1 if there isn't any.
-int ciBytecodeStream::get_constant_cache_index() const {
-  // work-alike for Bytecode_loadconstant::cache_index()
-  return has_cache_index() ? get_constant_raw_index() : -1;
-}
-
-// ------------------------------------------------------------------
 // ciBytecodeStream::get_constant
 //
 // If this bytecode is one of the ldc variants, get the referenced
@@ -318,19 +310,6 @@
 }
 
 // ------------------------------------------------------------------
-// ciBytecodeStream::get_field_signature_index
-//
-// Get the constant pool index of the signature of the field
-// referenced by the current bytecode.  Used for generating
-// deoptimization information.
-int ciBytecodeStream::get_field_signature_index() {
-  VM_ENTRY_MARK;
-  ConstantPool* cpool = _holder->get_instanceKlass()->constants();
-  int nt_index = cpool->name_and_type_ref_index_at(get_field_index());
-  return cpool->signature_ref_index_at(nt_index);
-}
-
-// ------------------------------------------------------------------
 // ciBytecodeStream::get_method_index
 //
 // If this is a method invocation bytecode, get the constant pool
@@ -474,13 +453,3 @@
   )
 }
 
-// ------------------------------------------------------------------
-// ciBytecodeStream::get_resolved_references
-ciObjArray* ciBytecodeStream::get_resolved_references() {
-    VM_ENTRY_MARK;
-    // Get the constant pool.
-  ConstantPool*        cpool   = _holder->get_instanceKlass()->constants();
-
-  // Create a resolved references array and return it.
-  return CURRENT_ENV->get_object(cpool->resolved_references())->as_obj_array();
-  }
--- a/src/hotspot/share/ci/ciStreams.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciStreams.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -70,12 +70,6 @@
     _start = _pc = base; _end = base + size;
   }
 
-  void assert_wide(bool require_wide) const {
-    if (require_wide)
-         { assert(is_wide(),  "must be a wide instruction"); }
-    else { assert(!is_wide(), "must not be a wide instruction"); }
-  }
-
   Bytecode bytecode() const { return Bytecode(this, _bc_start); }
   Bytecode next_bytecode() const { return Bytecode(this, _pc); }
 
@@ -155,10 +149,6 @@
     return bytecode().get_index_u1(cur_bc_raw());
   }
 
-  int get_index_u1_cpcache() const {
-    return bytecode().get_index_u1_cpcache(cur_bc_raw());
-  }
-
   // Get a byte index following this bytecode.
   // If prefixed with a wide bytecode, get a wide index.
   int get_index() const {
@@ -218,16 +208,12 @@
   int get_int_table( int index ) const {
     return Bytes::get_Java_u4((address)&_table_base[index]); }
 
-  // For tableswitch - get length of offset part
-  int get_tableswitch_length()  { return get_int_table(2)-get_int_table(1)+1; }
-
   int get_dest_table( int index ) const {
     return cur_bci() + get_int_table(index); }
 
   // --- Constant pool access ---
   int get_constant_raw_index() const;
   int get_constant_pool_index() const;
-  int get_constant_cache_index() const;
   int get_field_index();
   int get_method_index();
 
@@ -255,7 +241,6 @@
 
   ciInstanceKlass* get_declared_field_holder();
   int      get_field_holder_index();
-  int      get_field_signature_index();
 
   ciMethod*     get_method(bool& will_link, ciSignature* *declared_signature_result);
   bool          has_appendix();
@@ -266,8 +251,6 @@
   int           get_method_holder_index();
   int           get_method_signature_index(const constantPoolHandle& cpool);
 
-  // Get the resolved references arrays from the constant pool
-  ciObjArray* get_resolved_references();
 };
 
 
--- a/src/hotspot/share/ci/ciTypeFlow.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciTypeFlow.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -2427,22 +2427,6 @@
 }
 
 // ------------------------------------------------------------------
-// ciTypeFlow::PostOrderLoops::next
-//
-// Advance to next loop tree using a postorder, left-to-right traversal.
-void ciTypeFlow::PostorderLoops::next() {
-  assert(!done(), "must not be done.");
-  if (_current->sibling() != NULL) {
-    _current = _current->sibling();
-    while (_current->child() != NULL) {
-      _current = _current->child();
-    }
-  } else {
-    _current = _current->parent();
-  }
-}
-
-// ------------------------------------------------------------------
 // ciTypeFlow::PreOrderLoops::next
 //
 // Advance to next loop tree using a preorder, left-to-right traversal.
--- a/src/hotspot/share/ci/ciTypeFlow.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciTypeFlow.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -765,22 +765,6 @@
     void print(outputStream* st = tty, int indent = 0) const PRODUCT_RETURN;
   };
 
-  // Postorder iteration over the loop tree.
-  class PostorderLoops : public StackObj {
-  private:
-    Loop* _root;
-    Loop* _current;
-  public:
-    PostorderLoops(Loop* root) : _root(root), _current(root) {
-      while (_current->child() != NULL) {
-        _current = _current->child();
-      }
-    }
-    bool done() { return _current == NULL; }  // Finished iterating?
-    void next();                            // Advance to next loop
-    Loop* current() { return _current; }      // Return current loop.
-  };
-
   // Preorder iteration over the loop tree.
   class PreorderLoops : public StackObj {
   private:
@@ -857,7 +841,6 @@
   int start_block_num() const       { return 0; }
   Block* rpo_at(int rpo) const      { assert(0 <= rpo && rpo < block_count(), "out of bounds");
                                       return _block_map[rpo]; }
-  int next_pre_order()              { return _next_pre_order; }
   int inc_next_pre_order()          { return _next_pre_order++; }
 
 private:
--- a/src/hotspot/share/ci/ciUtilities.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciUtilities.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -42,13 +42,6 @@
 }
 
 // ------------------------------------------------------------------
-// basictype_to_char
-const char basictype_to_char(BasicType t) {
-  char c = type2char(t);
-  return c ? c : 'X';
-}
-
-// ------------------------------------------------------------------
 // card_table_base
 jbyte *ci_card_table_address() {
   BarrierSet* bs = BarrierSet::barrier_set();
--- a/src/hotspot/share/ci/ciUtilities.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/ci/ciUtilities.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -49,7 +49,6 @@
 }
 
 const char* basictype_to_str(BasicType t);
-const char  basictype_to_char(BasicType t);
 
 jbyte *ci_card_table_address();
 template <typename T> T ci_card_table_address_as() {
--- a/src/hotspot/share/interpreter/invocationCounter.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/interpreter/invocationCounter.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -78,9 +78,6 @@
 
 int                       InvocationCounter::_init  [InvocationCounter::number_of_states];
 InvocationCounter::Action InvocationCounter::_action[InvocationCounter::number_of_states];
-int                       InvocationCounter::InterpreterInvocationLimit;
-int                       InvocationCounter::InterpreterBackwardBranchLimit;
-int                       InvocationCounter::InterpreterProfileLimit;
 
 
 const char* InvocationCounter::state_as_string(State state) {
@@ -135,26 +132,6 @@
   guarantee((int)number_of_states <= (int)state_limit, "adjust number_of_state_bits");
   def(wait_for_nothing, 0, do_nothing);
   def(wait_for_compile, 0, do_decay);
-
-  InterpreterInvocationLimit = CompileThreshold << number_of_noncount_bits;
-  InterpreterProfileLimit = ((CompileThreshold * InterpreterProfilePercentage) / 100)<< number_of_noncount_bits;
-
-  // When methodData is collected, the backward branch limit is compared against a
-  // methodData counter, rather than an InvocationCounter.  In the former case, we
-  // don't need the shift by number_of_noncount_bits, but we do need to adjust
-  // the factor by which we scale the threshold.
-  if (ProfileInterpreter) {
-    InterpreterBackwardBranchLimit = (int)((int64_t)CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100);
-  } else {
-    InterpreterBackwardBranchLimit = (int)(((int64_t)CompileThreshold * OnStackReplacePercentage / 100) << number_of_noncount_bits);
-  }
-
-  assert(0 <= InterpreterBackwardBranchLimit,
-         "OSR threshold should be non-negative");
-  assert(0 <= InterpreterProfileLimit &&
-         InterpreterProfileLimit <= InterpreterInvocationLimit,
-         "profile threshold should be less than the compilation threshold "
-         "and non-negative");
 }
 
 void invocationCounter_init() {
--- a/src/hotspot/share/interpreter/invocationCounter.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/interpreter/invocationCounter.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -57,10 +57,6 @@
   };
 
  public:
-  static int InterpreterInvocationLimit;        // CompileThreshold scaled for interpreter use
-  static int InterpreterBackwardBranchLimit;    // A separate threshold for on stack replacement
-  static int InterpreterProfileLimit;           // Profiling threshold scaled for interpreter use
-
   typedef address (*Action)(const methodHandle& method, TRAPS);
 
   enum PublicConstants {
@@ -95,10 +91,6 @@
   Action action() const                          { return _action[state()]; }
   int    count() const                           { return _counter >> number_of_noncount_bits; }
 
-  int   get_InvocationLimit() const              { return InterpreterInvocationLimit >> number_of_noncount_bits; }
-  int   get_BackwardBranchLimit() const          { return InterpreterBackwardBranchLimit >> number_of_noncount_bits; }
-  int   get_ProfileLimit() const                 { return InterpreterProfileLimit >> number_of_noncount_bits; }
-
 #ifdef CC_INTERP
   // Test counter using scaled limits like the asm interpreter would do rather than doing
   // the shifts to normalize the counter.
--- a/src/hotspot/share/libadt/set.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/libadt/set.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -35,22 +35,8 @@
 
 //-------------------------Virtual Functions-----------------------------------
 // These functions MUST be implemented by the inheriting class.
-class SparseSet;
-/* Removed for MCC BUG
-   Set::operator const SparseSet*() const { assert(0); return NULL; } */
-const SparseSet *Set::asSparseSet() const { assert(0); return NULL; }
 class VectorSet;
-/* Removed for MCC BUG
-   Set::operator const VectorSet*() const { assert(0); return NULL; } */
 const VectorSet *Set::asVectorSet() const { assert(0); return NULL; }
-class ListSet;
-/* Removed for MCC BUG
-   Set::operator const ListSet*() const { assert(0); return NULL; } */
-const ListSet *Set::asListSet() const { assert(0); return NULL; }
-class CoSet;
-/* Removed for MCC BUG
-   Set::operator const CoSet*() const { assert(0); return NULL; } */
-const CoSet *Set::asCoSet() const { assert(0); return NULL; }
 
 //------------------------------setstr-----------------------------------------
 // Create a string with a printable representation of a set.
--- a/src/hotspot/share/libadt/set.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/libadt/set.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -164,9 +164,6 @@
   virtual int operator <=(const Set &s) const=0;
   int operator >=(const Set &s) const { return s <= *this; }
 
-  // Return any member of the Set.  Undefined if the Set is empty.
-  virtual uint getelem(void) const=0;
-
   // Clear all the elements in the Set
   virtual void Clear(void)=0;
 
@@ -188,15 +185,7 @@
   virtual int parse(const char *s);
 
   // Convert a generic Set to a specific Set
-  /* Removed for MCC BUG
-     virtual operator const SparseSet* (void) const;
-     virtual operator const VectorSet* (void) const;
-     virtual operator const ListSet  * (void) const;
-     virtual operator const CoSet    * (void) const; */
-  virtual const SparseSet *asSparseSet(void) const;
   virtual const VectorSet *asVectorSet(void) const;
-  virtual const ListSet   *asListSet  (void) const;
-  virtual const CoSet     *asCoSet    (void) const;
 
   // Hash the set.  Sets of different types but identical elements will NOT
   // hash the same.  Same set type, same elements WILL hash the same.
@@ -204,16 +193,11 @@
 
 protected:
   friend class SetI;
-  friend class CoSet;
   virtual class SetI_ *iterate(uint&) const=0;
 
   // Need storeage for the set
   Arena *_set_arena;
 };
-typedef Set&((*Set_Constructor)(Arena *arena));
-extern Set &ListSet_Construct(Arena *arena);
-extern Set &VectorSet_Construct(Arena *arena);
-extern Set &SparseSet_Construct(Arena *arena);
 
 //------------------------------Iteration--------------------------------------
 // Loop thru all elements of the set, setting "elem" to the element numbers
--- a/src/hotspot/share/libadt/vectset.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/libadt/vectset.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -60,12 +60,6 @@
   data[1] = 0;
 }
 
-//------------------------------Construct--------------------------------------
-Set &VectorSet_Construct(Arena *arena)
-{
-  return *(new VectorSet(arena));
-}
-
 //------------------------------operator=--------------------------------------
 Set &VectorSet::operator = (const Set &set)
 {
@@ -293,20 +287,6 @@
   return ((data[word] & mask))!=0;    // Return the sense of the bit
 }
 
-//------------------------------getelem----------------------------------------
-// Get any element from the set.
-uint VectorSet::getelem(void) const
-{
-  uint i;                       // Exit value of loop
-  for( i=0; i<size; i++ )
-    if( data[i] )
-      break;
-  uint32_t word = data[i];
-  int j;                        // Exit value of loop
-  for( j= -1; word; j++, word>>=1 );
-  return (i<<5)+j;
-}
-
 //------------------------------Clear------------------------------------------
 // Clear a set
 void VectorSet::Clear(void)
--- a/src/hotspot/share/libadt/vectset.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/libadt/vectset.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -95,7 +95,6 @@
   int disjoint   (const Set       &s) const;  // True if sets are disjoint
 
   int operator [](uint elem) const; // Test for membership
-  uint getelem(void) const;         // Return a random element
   void Clear(void);                 // Clear a set
   uint Size(void) const;            // Number of elements in the Set.
   void Sort(void);                  // Sort before iterating
--- a/src/hotspot/share/oops/compiledICHolder.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/oops/compiledICHolder.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -65,9 +65,6 @@
   Klass*    holder_klass()  const     { return _holder_klass; }
   Metadata* holder_metadata() const   { return _holder_metadata; }
 
-  void set_holder_metadata(Metadata* m) { _holder_metadata = m; }
-  void set_holder_klass(Klass* k)     { _holder_klass = k; }
-
   static int holder_metadata_offset() { return offset_of(CompiledICHolder, _holder_metadata); }
   static int holder_klass_offset()    { return offset_of(CompiledICHolder, _holder_klass); }
 
--- a/src/hotspot/share/runtime/deoptimization.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -1284,36 +1284,6 @@
 }
 
 
-void Deoptimization::revoke_biases_of_monitors(CodeBlob* cb) {
-  if (!UseBiasedLocking) {
-    return;
-  }
-
-  assert(SafepointSynchronize::is_at_safepoint(), "must only be called from safepoint");
-  GrowableArray<Handle>* objects_to_revoke = new GrowableArray<Handle>();
-  for (JavaThreadIteratorWithHandle jtiwh; JavaThread *jt = jtiwh.next(); ) {
-    if (jt->has_last_Java_frame()) {
-      StackFrameStream sfs(jt, true);
-      while (!sfs.is_done()) {
-        frame* cur = sfs.current();
-        if (cb->contains(cur->pc())) {
-          vframe* vf = vframe::new_vframe(cur, sfs.register_map(), jt);
-          compiledVFrame* cvf = compiledVFrame::cast(vf);
-          // Revoke monitors' biases in all scopes
-          while (!cvf->is_top()) {
-            collect_monitors(cvf, objects_to_revoke);
-            cvf = compiledVFrame::cast(cvf->sender());
-          }
-          collect_monitors(cvf, objects_to_revoke);
-        }
-        sfs.next();
-      }
-    }
-  }
-  BiasedLocking::revoke_at_safepoint(objects_to_revoke);
-}
-
-
 void Deoptimization::deoptimize_single_frame(JavaThread* thread, frame fr, Deoptimization::DeoptReason reason) {
   assert(fr.can_be_deoptimized(), "checking frame type");
 
@@ -2300,11 +2270,6 @@
   return _deoptimization_hist[Reason_none][0][0];
 }
 
-jint Deoptimization::deoptimization_count(DeoptReason reason) {
-  assert(reason >= 0 && reason < Reason_LIMIT, "oob");
-  return _deoptimization_hist[reason][0][0];
-}
-
 void Deoptimization::print_statistics() {
   juint total = total_deoptimization_count();
   juint account = total;
--- a/src/hotspot/share/runtime/deoptimization.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/runtime/deoptimization.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -154,9 +154,6 @@
   // Helper function to revoke biases of all monitors in frame if UseBiasedLocking
   // is enabled
   static void revoke_biases_of_monitors(JavaThread* thread, frame fr, RegisterMap* map);
-  // Helper function to revoke biases of all monitors in frames
-  // executing in a particular CodeBlob if UseBiasedLocking is enabled
-  static void revoke_biases_of_monitors(CodeBlob* cb);
 
 #if COMPILER2_OR_JVMCI
 JVMCI_ONLY(public:)
@@ -420,7 +417,6 @@
                                          int trap_request);
 
   static jint total_deoptimization_count();
-  static jint deoptimization_count(DeoptReason reason);
 
   // JVMTI PopFrame support
 
--- a/src/hotspot/share/runtime/stubRoutines.cpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/runtime/stubRoutines.cpp	Tue Jan 29 14:34:26 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -73,7 +73,6 @@
 
 jint    StubRoutines::_fpu_cntrl_wrd_std                        = 0;
 jint    StubRoutines::_fpu_cntrl_wrd_24                         = 0;
-jint    StubRoutines::_fpu_cntrl_wrd_64                         = 0;
 jint    StubRoutines::_fpu_cntrl_wrd_trunc                      = 0;
 jint    StubRoutines::_mxcsr_std                                = 0;
 jint    StubRoutines::_fpu_subnormal_bias1[3]                   = { 0, 0, 0 };
@@ -163,11 +162,6 @@
 address StubRoutines::_dlibm_tan_cot_huge = NULL;
 address StubRoutines::_dtan = NULL;
 
-double (* StubRoutines::_intrinsic_log10 )(double) = NULL;
-double (* StubRoutines::_intrinsic_sin   )(double) = NULL;
-double (* StubRoutines::_intrinsic_cos   )(double) = NULL;
-double (* StubRoutines::_intrinsic_tan   )(double) = NULL;
-
 address StubRoutines::_safefetch32_entry                 = NULL;
 address StubRoutines::_safefetch32_fault_pc              = NULL;
 address StubRoutines::_safefetch32_continuation_pc       = NULL;
--- a/src/hotspot/share/runtime/stubRoutines.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/runtime/stubRoutines.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -78,10 +78,6 @@
 class StubRoutines: AllStatic {
 
  public:
-  enum platform_independent_constants {
-    max_size_of_parameters = 256                           // max. parameter size supported by megamorphic lookups
-  };
-
   // Dependencies
   friend class StubGenerator;
 
@@ -114,7 +110,6 @@
 
   static jint    _fpu_cntrl_wrd_std;
   static jint    _fpu_cntrl_wrd_24;
-  static jint    _fpu_cntrl_wrd_64;
   static jint    _fpu_cntrl_wrd_trunc;
   static jint    _mxcsr_std;
   static jint    _fpu_subnormal_bias1[3];
@@ -207,18 +202,6 @@
   static address _dlibm_tan_cot_huge;
   static address _dtan;
 
-  // These are versions of the java.lang.Math methods which perform
-  // the same operations as the intrinsic version.  They are used for
-  // constant folding in the compiler to ensure equivalence.  If the
-  // intrinsic version returns the same result as the strict version
-  // then they can be set to the appropriate function from
-  // SharedRuntime.
-  static double (*_intrinsic_log10)(double);
-  static double (*_intrinsic_pow)(double, double);
-  static double (*_intrinsic_sin)(double);
-  static double (*_intrinsic_cos)(double);
-  static double (*_intrinsic_tan)(double);
-
   // Safefetch stubs.
   static address _safefetch32_entry;
   static address _safefetch32_fault_pc;
@@ -289,7 +272,6 @@
   static jint    fpu_cntrl_wrd_std()                       { return _fpu_cntrl_wrd_std;   }
   static address addr_fpu_cntrl_wrd_std()                  { return (address)&_fpu_cntrl_wrd_std;   }
   static address addr_fpu_cntrl_wrd_24()                   { return (address)&_fpu_cntrl_wrd_24;   }
-  static address addr_fpu_cntrl_wrd_64()                   { return (address)&_fpu_cntrl_wrd_64;   }
   static address addr_fpu_cntrl_wrd_trunc()                { return (address)&_fpu_cntrl_wrd_trunc; }
   static address addr_mxcsr_std()                          { return (address)&_mxcsr_std; }
   static address addr_fpu_subnormal_bias1()                { return (address)&_fpu_subnormal_bias1; }
@@ -386,27 +368,6 @@
 
   static address zero_aligned_words()  { return _zero_aligned_words; }
 
-  static double  intrinsic_log10(double d) {
-    assert(_intrinsic_log10 != NULL, "must be defined");
-    return _intrinsic_log10(d);
-  }
-  static double  intrinsic_pow(double d, double d2) {
-    assert(_intrinsic_pow != NULL, "must be defined");
-    return _intrinsic_pow(d, d2);
-  }
-  static double  intrinsic_sin(double d) {
-    assert(_intrinsic_sin != NULL, "must be defined");
-    return _intrinsic_sin(d);
-  }
-  static double  intrinsic_cos(double d) {
-    assert(_intrinsic_cos != NULL, "must be defined");
-    return _intrinsic_cos(d);
-  }
-  static double  intrinsic_tan(double d) {
-    assert(_intrinsic_tan != NULL, "must be defined");
-    return _intrinsic_tan(d);
-  }
-
   //
   // Safefetch stub support
   //
--- a/src/hotspot/share/utilities/bitMap.hpp	Tue Jan 29 08:39:04 2019 -0500
+++ b/src/hotspot/share/utilities/bitMap.hpp	Tue Jan 29 14:34:26 2019 +0100
@@ -429,12 +429,6 @@
     return _map.size();
   }
 
-  // Returns number of full slots that have been allocated
-  idx_t size_in_slots() {
-    // Round down
-    return _map.size() / _bits_per_slot;
-  }
-
   bool is_valid_index(idx_t slot_index, idx_t bit_within_slot_index);
   bool at(idx_t slot_index, idx_t bit_within_slot_index) const;
   void set_bit(idx_t slot_index, idx_t bit_within_slot_index);