Skip to content

Commit 104d0cb

Browse files
author
Quan Anh Mai
committed
8373577: C2: Cleanup adr_type of CallLeafPureNode
Reviewed-by: roland, vlivanov
1 parent 4f1dcf8 commit 104d0cb

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/hotspot/share/opto/callnode.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,9 +943,8 @@ class CallLeafPureNode : public CallLeafNode {
943943
TupleNode* make_tuple_of_input_state_and_top_return_values(const Compile* C) const;
944944

945945
public:
946-
CallLeafPureNode(const TypeFunc* tf, address addr, const char* name,
947-
const TypePtr* adr_type)
948-
: CallLeafNode(tf, addr, name, adr_type) {
946+
CallLeafPureNode(const TypeFunc* tf, address addr, const char* name)
947+
: CallLeafNode(tf, addr, name, nullptr) {
949948
init_class_id(Class_CallLeafPure);
950949
}
951950
int Opcode() const override;

src/hotspot/share/opto/divnode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
#include <math.h>
4444

45-
ModFloatingNode::ModFloatingNode(Compile* C, const TypeFunc* tf, address addr, const char* name) : CallLeafPureNode(tf, addr, name, TypeRawPtr::BOTTOM) {
45+
ModFloatingNode::ModFloatingNode(Compile* C, const TypeFunc* tf, address addr, const char* name) : CallLeafPureNode(tf, addr, name) {
4646
add_flag(Flag_is_macro);
4747
C->add_macro_node(this);
4848
}

src/hotspot/share/opto/graphKit.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2505,7 +2505,8 @@ Node* GraphKit::make_runtime_call(int flags,
25052505
uint num_bits = call_type->range()->field_at(TypeFunc::Parms)->is_vect()->length_in_bytes() * BitsPerByte;
25062506
call = new CallLeafVectorNode(call_type, call_addr, call_name, adr_type, num_bits);
25072507
} else if (flags & RC_PURE) {
2508-
call = new CallLeafPureNode(call_type, call_addr, call_name, adr_type);
2508+
assert(adr_type == nullptr, "pure call does not touch memory");
2509+
call = new CallLeafPureNode(call_type, call_addr, call_name);
25092510
} else {
25102511
call = new CallLeafNode(call_type, call_addr, call_name, adr_type);
25112512
}

src/hotspot/share/opto/macro.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2658,8 +2658,7 @@ bool PhaseMacroExpand::expand_macro_nodes() {
26582658
case Op_ModD:
26592659
case Op_ModF: {
26602660
CallNode* mod_macro = n->as_Call();
2661-
CallNode* call = new CallLeafPureNode(mod_macro->tf(), mod_macro->entry_point(),
2662-
mod_macro->_name, TypeRawPtr::BOTTOM);
2661+
CallNode* call = new CallLeafPureNode(mod_macro->tf(), mod_macro->entry_point(), mod_macro->_name);
26632662
call->init_req(TypeFunc::Control, mod_macro->in(TypeFunc::Control));
26642663
call->init_req(TypeFunc::I_O, C->top());
26652664
call->init_req(TypeFunc::Memory, C->top());

0 commit comments

Comments
 (0)