8373577: C2: Cleanup adr_type of CallLeafPureNode

Reviewed-by: roland, vlivanov
This commit is contained in:
Quan Anh Mai 2025-12-13 14:07:24 +00:00
parent 4f1dcf89b8
commit 104d0cb542
4 changed files with 6 additions and 7 deletions

View File

@ -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;

View File

@ -42,7 +42,7 @@
#include <math.h>
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);
}

View File

@ -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);
}

View File

@ -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());