Skip to content

Commit 7c9c8ba

Browse files
benoitmaillardmarc-chevalier
authored andcommitted
8356780: PhaseMacroExpand::_has_locks is unused
Reviewed-by: mhaessig, chagedorn, kvn, mchevalier
1 parent ca7b885 commit 7c9c8ba

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/hotspot/share/opto/macro.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,7 +2407,6 @@ void PhaseMacroExpand::eliminate_macro_nodes() {
24072407
}
24082408
}
24092409
// Next, attempt to eliminate allocations
2410-
_has_locks = false;
24112410
progress = true;
24122411
while (progress) {
24132412
progress = false;
@@ -2431,7 +2430,6 @@ void PhaseMacroExpand::eliminate_macro_nodes() {
24312430
case Node::Class_Lock:
24322431
case Node::Class_Unlock:
24332432
assert(!n->as_AbstractLock()->is_eliminated(), "sanity");
2434-
_has_locks = true;
24352433
break;
24362434
case Node::Class_ArrayCopy:
24372435
break;

src/hotspot/share/opto/macro.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -83,9 +83,6 @@ class PhaseMacroExpand : public Phase {
8383
// projections extracted from a call node
8484
CallProjections _callprojs;
8585

86-
// Additional data collected during macro expansion
87-
bool _has_locks;
88-
8986
void expand_allocate(AllocateNode *alloc);
9087
void expand_allocate_array(AllocateArrayNode *alloc);
9188
void expand_allocate_common(AllocateNode* alloc,
@@ -199,7 +196,7 @@ class PhaseMacroExpand : public Phase {
199196
Node* make_arraycopy_load(ArrayCopyNode* ac, intptr_t offset, Node* ctl, Node* mem, BasicType ft, const Type *ftype, AllocateNode *alloc);
200197

201198
public:
202-
PhaseMacroExpand(PhaseIterGVN &igvn) : Phase(Macro_Expand), _igvn(igvn), _has_locks(false) {
199+
PhaseMacroExpand(PhaseIterGVN &igvn) : Phase(Macro_Expand), _igvn(igvn) {
203200
_igvn.set_delay_transform(true);
204201
}
205202

0 commit comments

Comments
 (0)