From 104d0cb542d12f133ac8a0a34f2b21ca3aa4a5cc Mon Sep 17 00:00:00 2001 From: Quan Anh Mai Date: Sat, 13 Dec 2025 14:07:24 +0000 Subject: [PATCH] 8373577: C2: Cleanup adr_type of CallLeafPureNode Reviewed-by: roland, vlivanov --- src/hotspot/share/opto/callnode.hpp | 5 ++--- src/hotspot/share/opto/divnode.cpp | 2 +- src/hotspot/share/opto/graphKit.cpp | 3 ++- src/hotspot/share/opto/macro.cpp | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/hotspot/share/opto/callnode.hpp b/src/hotspot/share/opto/callnode.hpp index 90a86d76679..de4b8941359 100644 --- a/src/hotspot/share/opto/callnode.hpp +++ b/src/hotspot/share/opto/callnode.hpp @@ -943,9 +943,8 @@ protected: TupleNode* make_tuple_of_input_state_and_top_return_values(const Compile* C) const; public: - CallLeafPureNode(const TypeFunc* tf, address addr, const char* name, - const TypePtr* adr_type) - : CallLeafNode(tf, addr, name, adr_type) { + CallLeafPureNode(const TypeFunc* tf, address addr, const char* name) + : CallLeafNode(tf, addr, name, nullptr) { init_class_id(Class_CallLeafPure); } int Opcode() const override; diff --git a/src/hotspot/share/opto/divnode.cpp b/src/hotspot/share/opto/divnode.cpp index cf5bc8ce643..f3039b12508 100644 --- a/src/hotspot/share/opto/divnode.cpp +++ b/src/hotspot/share/opto/divnode.cpp @@ -42,7 +42,7 @@ #include -ModFloatingNode::ModFloatingNode(Compile* C, const TypeFunc* tf, address addr, const char* name) : CallLeafPureNode(tf, addr, name, TypeRawPtr::BOTTOM) { +ModFloatingNode::ModFloatingNode(Compile* C, const TypeFunc* tf, address addr, const char* name) : CallLeafPureNode(tf, addr, name) { add_flag(Flag_is_macro); C->add_macro_node(this); } diff --git a/src/hotspot/share/opto/graphKit.cpp b/src/hotspot/share/opto/graphKit.cpp index 49c411843d5..f5c15a81cb6 100644 --- a/src/hotspot/share/opto/graphKit.cpp +++ b/src/hotspot/share/opto/graphKit.cpp @@ -2505,7 +2505,8 @@ Node* GraphKit::make_runtime_call(int flags, uint num_bits = call_type->range()->field_at(TypeFunc::Parms)->is_vect()->length_in_bytes() * BitsPerByte; call = new CallLeafVectorNode(call_type, call_addr, call_name, adr_type, num_bits); } else if (flags & RC_PURE) { - call = new CallLeafPureNode(call_type, call_addr, call_name, adr_type); + assert(adr_type == nullptr, "pure call does not touch memory"); + call = new CallLeafPureNode(call_type, call_addr, call_name); } else { call = new CallLeafNode(call_type, call_addr, call_name, adr_type); } diff --git a/src/hotspot/share/opto/macro.cpp b/src/hotspot/share/opto/macro.cpp index 90602bc2b35..bc07f937f1e 100644 --- a/src/hotspot/share/opto/macro.cpp +++ b/src/hotspot/share/opto/macro.cpp @@ -2658,8 +2658,7 @@ bool PhaseMacroExpand::expand_macro_nodes() { case Op_ModD: case Op_ModF: { CallNode* mod_macro = n->as_Call(); - CallNode* call = new CallLeafPureNode(mod_macro->tf(), mod_macro->entry_point(), - mod_macro->_name, TypeRawPtr::BOTTOM); + CallNode* call = new CallLeafPureNode(mod_macro->tf(), mod_macro->entry_point(), mod_macro->_name); call->init_req(TypeFunc::Control, mod_macro->in(TypeFunc::Control)); call->init_req(TypeFunc::I_O, C->top()); call->init_req(TypeFunc::Memory, C->top());