# HG changeset patch # User rkennke # Date 1576021834 -3600 # Wed Dec 11 00:50:34 2019 +0100 # Node ID 37021963546e7c5c0384619b705f730dfd2b5a13 # Parent 336885e766af8fcb084782a1e2df2225f250ce4c 8234974: Shenandoah: Do concurrent roots even when no evacuation is necessary diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp --- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp +++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp @@ -1018,7 +1018,7 @@ void ShenandoahBarrierC2Support::call_lrb_stub(Node*& ctrl, Node*& val, Node* load_addr, Node*& result_mem, Node* raw_mem, bool is_native, PhaseIdealLoop* phase) { IdealLoopTree*loop = phase->get_loop(ctrl); - const TypePtr* obj_type = phase->igvn().type(val)->is_oopptr()->cast_to_nonconst(); + const TypePtr* obj_type = phase->igvn().type(val)->is_oopptr(); // The slow path stub consumes and produces raw memory in addition // to the existing memory edges @@ -2138,7 +2138,7 @@ if (t == TypePtr::NULL_PTR) { return t; } - return t->is_oopptr()->cast_to_nonconst(); + return t->is_oopptr(); } const Type* ShenandoahEnqueueBarrierNode::Value(PhaseGVN* phase) const { @@ -2152,7 +2152,7 @@ if (t == TypePtr::NULL_PTR) { return t; } - return t->is_oopptr()->cast_to_nonconst(); + return t->is_oopptr(); } int ShenandoahEnqueueBarrierNode::needed(Node* n) { @@ -3079,7 +3079,7 @@ return t2; } - const Type* type = t2->is_oopptr()/*->cast_to_nonconst()*/; + const Type* type = t2->is_oopptr(); return type; } diff --git a/src/hotspot/share/opto/type.cpp b/src/hotspot/share/opto/type.cpp --- a/src/hotspot/share/opto/type.cpp +++ b/src/hotspot/share/opto/type.cpp @@ -3051,10 +3051,6 @@ return this; } -const TypeOopPtr *TypeOopPtr::cast_to_nonconst() const { - return this; -} - //-----------------------------cast_to_exactness------------------------------- const Type *TypeOopPtr::cast_to_exactness(bool klass_is_exact) const { // There is no such thing as an exact general oop. @@ -3561,11 +3557,6 @@ return make(_ptr, klass(), _klass_is_exact, const_oop(), _offset, instance_id, _speculative, _inline_depth); } -const TypeOopPtr *TypeInstPtr::cast_to_nonconst() const { - if (const_oop() == NULL) return this; - return make(NotNull, klass(), _klass_is_exact, NULL, _offset, _instance_id, _speculative, _inline_depth); -} - //------------------------------xmeet_unloaded--------------------------------- // Compute the MEET of two InstPtrs when at least one is unloaded. // Assume classes are different since called after check for same name/class-loader @@ -4098,11 +4089,6 @@ return make(_ptr, const_oop(), _ary, klass(), _klass_is_exact, _offset, instance_id, _speculative, _inline_depth); } -const TypeOopPtr *TypeAryPtr::cast_to_nonconst() const { - if (const_oop() == NULL) return this; - return make(NotNull, NULL, _ary, klass(), _klass_is_exact, _offset, _instance_id, _speculative, _inline_depth); -} - //-----------------------------max_array_length------------------------------- // A wrapper around arrayOopDesc::max_array_length(etype) with some input normalization. diff --git a/src/hotspot/share/opto/type.hpp b/src/hotspot/share/opto/type.hpp --- a/src/hotspot/share/opto/type.hpp +++ b/src/hotspot/share/opto/type.hpp @@ -1030,8 +1030,6 @@ virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const; - virtual const TypeOopPtr *cast_to_nonconst() const; - // corresponding pointer to klass, for a given instance const TypeKlassPtr* as_klass_type() const; @@ -1116,8 +1114,6 @@ virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const; - virtual const TypeOopPtr *cast_to_nonconst() const; - virtual const TypePtr *add_offset( intptr_t offset ) const; // Speculative type helper methods. @@ -1202,8 +1198,6 @@ virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const; - virtual const TypeOopPtr *cast_to_nonconst() const; - virtual const TypeAryPtr* cast_to_size(const TypeInt* size) const; virtual const TypeInt* narrow_size_type(const TypeInt* size) const;