Remove UseCCP from opto

This commit is contained in:
tstuefe 2025-11-17 12:45:50 +01:00
parent 3769b9ded4
commit d448f8e46c
7 changed files with 9 additions and 14 deletions

View File

@ -2590,7 +2590,7 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
#ifdef _LP64
// Push DecodeN/DecodeNKlass down through phi.
// The rest of phi graph will transform by split EncodeP node though phis up.
if ((UseCompressedOops || USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE) && can_reshape && progress == nullptr) {
if (can_reshape && progress == nullptr) {
bool may_push = true;
bool has_decodeN = false;
bool is_decodeN = false;

View File

@ -2633,7 +2633,7 @@ void PhaseChaitin::verify_base_ptrs(ResourceArea* a) const {
#ifdef _LP64
(UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_CastPP) ||
(UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_DecodeN) ||
(USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE && check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass) ||
(check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass) ||
#endif // _LP64
check->as_Mach()->ideal_Opcode() == Op_LoadP ||
check->as_Mach()->ideal_Opcode() == Op_LoadKlass))) {

View File

@ -3419,8 +3419,7 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
addp->in(AddPNode::Base) == n->in(AddPNode::Base),
"Base pointers must match (addp %u)", addp->_idx );
#ifdef _LP64
if ((UseCompressedOops || USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE) &&
addp->Opcode() == Op_ConP &&
if (addp->Opcode() == Op_ConP &&
addp == n->in(AddPNode::Base) &&
n->in(AddPNode::Offset)->is_Con()) {
// If the transformation of ConP to ConN+DecodeN is beneficial depends
@ -3433,7 +3432,7 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
bool is_klass = t->isa_klassptr() != nullptr;
if ((is_oop && UseCompressedOops && Matcher::const_oop_prefer_decode() ) ||
(is_klass && USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE && Matcher::const_klass_prefer_decode() &&
(is_klass && Matcher::const_klass_prefer_decode() &&
t->isa_klassptr()->exact_klass()->is_in_encoding_range())) {
Node* nn = nullptr;
@ -3974,8 +3973,7 @@ void Compile::final_graph_reshaping_walk(Node_Stack& nstack, Node* root, Final_R
}
// Skip next transformation if compressed oops are not used.
if ((UseCompressedOops && !Matcher::gen_narrow_oop_implicit_null_checks()) ||
(!UseCompressedOops && !USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE))
if (UseCompressedOops && !Matcher::gen_narrow_oop_implicit_null_checks())
return;
// Go over safepoints nodes to skip DecodeN/DecodeNKlass nodes for debug edges.

View File

@ -306,8 +306,7 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
// cannot reason about it; is probably not implicit null exception
} else {
const TypePtr* tptr;
if ((UseCompressedOops && CompressedOops::shift() == 0) ||
(USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE && CompressedKlassPointers::shift() == 0)) {
if ((UseCompressedOops && CompressedOops::shift() == 0) || CompressedKlassPointers::shift() == 0) {
// 32-bits narrow oop can be the base of address expressions
tptr = base->get_ptr_type();
} else {

View File

@ -2400,7 +2400,6 @@ Node* LoadKlassNode::make(PhaseGVN& gvn, Node* mem, Node* adr, const TypePtr* at
assert(adr_type != nullptr, "expecting TypeKlassPtr");
#ifdef _LP64
if (adr_type->is_ptr_to_narrowklass()) {
assert(USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE, "no compressed klasses");
Node* load_klass = gvn.transform(new LoadNKlassNode(mem, adr, at, tk->make_narrowklass(), MemNode::unordered));
return new DecodeNKlassNode(load_klass, load_klass->bottom_type()->make_ptr());
}
@ -2708,8 +2707,7 @@ StoreNode* StoreNode::make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const
val = gvn.transform(new EncodePNode(val, val->bottom_type()->make_narrowoop()));
return new StoreNNode(ctl, mem, adr, adr_type, val, mo);
} else if (adr->bottom_type()->is_ptr_to_narrowklass() ||
(USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE && val->bottom_type()->isa_klassptr() &&
adr->bottom_type()->isa_rawptr())) {
(val->bottom_type()->isa_klassptr() && adr->bottom_type()->isa_rawptr())) {
val = gvn.transform(new EncodePKlassNode(val, val->bottom_type()->make_narrowklass()));
return new StoreNKlassNode(ctl, mem, adr, adr_type, val, mo);
}

View File

@ -102,7 +102,7 @@ const Type* EncodePKlassNode::Value(PhaseGVN* phase) const {
if (t == Type::TOP) return Type::TOP;
assert (t != TypePtr::NULL_PTR, "null klass?");
assert(USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE && t->isa_klassptr(), "only klass ptr here");
assert(t->isa_klassptr(), "only klass ptr here");
return t->make_narrowklass();
}

View File

@ -3461,7 +3461,7 @@ TypeOopPtr::TypeOopPtr(TYPES t, PTR ptr, ciKlass* k, const TypeInterfaces* inter
#ifdef _LP64
if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
if (_offset == oopDesc::klass_offset_in_bytes()) {
_is_ptr_to_narrowklass = USE_COMPRESSED_CLASS_POINTERS_ALWAYS_TRUE;
_is_ptr_to_narrowklass = true;
} else if (klass() == nullptr) {
// Array with unknown body type
assert(this->isa_aryptr(), "only arrays without klass");