Skip to content

Commit 30b9ff6

Browse files
Xin LiuVladimir Ivanov
Xin Liu
authored and
Vladimir Ivanov
committed
8258653: CallJavaNode::_bci is not in use
Reviewed-by: kvn, vlivanov
1 parent 12297a0 commit 30b9ff6

14 files changed

+20
-30
lines changed

src/hotspot/cpu/ppc/ppc.ad

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3583,7 +3583,6 @@ encode %{
35833583
call->_method_handle_invoke = _method_handle_invoke;
35843584
call->_vtable_index = _vtable_index;
35853585
call->_method = _method;
3586-
call->_bci = _bci;
35873586
call->_optimized_virtual = _optimized_virtual;
35883587
call->_tf = _tf;
35893588
call->_entry_point = _entry_point;

src/hotspot/share/opto/callGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ JVMState* DirectCallGenerator::generate(JVMState* jvms) {
151151
kit.C->log()->elem("direct_call bci='%d'", jvms->bci());
152152
}
153153

154-
CallStaticJavaNode *call = new CallStaticJavaNode(kit.C, tf(), target, method(), kit.bci());
154+
CallStaticJavaNode* call = new CallStaticJavaNode(kit.C, tf(), target, method());
155155
if (is_inlined_method_handle_intrinsic(jvms, method())) {
156156
// To be able to issue a direct call and skip a call to MH.linkTo*/invokeBasic adapter,
157157
// additional information about the method being invoked should be attached
@@ -265,7 +265,7 @@ JVMState* VirtualCallGenerator::generate(JVMState* jvms) {
265265
"no vtable calls if +UseInlineCaches ");
266266
address target = SharedRuntime::get_resolve_virtual_call_stub();
267267
// Normal inline cache used for call
268-
CallDynamicJavaNode *call = new CallDynamicJavaNode(tf(), target, method(), _vtable_index, kit.bci());
268+
CallDynamicJavaNode* call = new CallDynamicJavaNode(tf(), target, method(), _vtable_index);
269269
if (is_inlined_method_handle_intrinsic(jvms, method())) {
270270
// To be able to issue a direct call (optimized virtual or virtual)
271271
// and skip a call to MH.linkTo*/invokeBasic adapter, additional information

src/hotspot/share/opto/callnode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ bool CallJavaNode::validate_symbolic_info() const {
10131013
if (method() == NULL) {
10141014
return true; // call into runtime or uncommon trap
10151015
}
1016-
ciMethod* symbolic_info = jvms()->method()->get_method_at_bci(_bci);
1016+
ciMethod* symbolic_info = jvms()->method()->get_method_at_bci(jvms()->bci());
10171017
ciMethod* callee = method();
10181018
if (symbolic_info->is_method_handle_intrinsic() && !callee->is_method_handle_intrinsic()) {
10191019
assert(override_symbolic_info(), "should be set");

src/hotspot/share/opto/callnode.hpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -671,14 +671,13 @@ class CallJavaNode : public CallNode {
671671
ciMethod* _method; // Method being direct called
672672
bool _arg_escape; // ArgEscape in parameter list
673673
public:
674-
const int _bci; // Byte Code Index of call byte code
675-
CallJavaNode(const TypeFunc* tf , address addr, ciMethod* method, int bci)
674+
CallJavaNode(const TypeFunc* tf , address addr, ciMethod* method)
676675
: CallNode(tf, addr, TypePtr::BOTTOM),
677676
_optimized_virtual(false),
678677
_method_handle_invoke(false),
679678
_override_symbolic_info(false),
680679
_method(method),
681-
_arg_escape(false), _bci(bci)
680+
_arg_escape(false)
682681
{
683682
init_class_id(Class_CallJava);
684683
}
@@ -712,17 +711,16 @@ class CallStaticJavaNode : public CallJavaNode {
712711
virtual bool cmp( const Node &n ) const;
713712
virtual uint size_of() const; // Size is bigger
714713
public:
715-
CallStaticJavaNode(Compile* C, const TypeFunc* tf, address addr, ciMethod* method, int bci)
716-
: CallJavaNode(tf, addr, method, bci) {
714+
CallStaticJavaNode(Compile* C, const TypeFunc* tf, address addr, ciMethod* method)
715+
: CallJavaNode(tf, addr, method) {
717716
init_class_id(Class_CallStaticJava);
718717
if (C->eliminate_boxing() && (method != NULL) && method->is_boxing_method()) {
719718
init_flags(Flag_is_macro);
720719
C->add_macro_node(this);
721720
}
722721
}
723-
CallStaticJavaNode(const TypeFunc* tf, address addr, const char* name, int bci,
724-
const TypePtr* adr_type)
725-
: CallJavaNode(tf, addr, NULL, bci) {
722+
CallStaticJavaNode(const TypeFunc* tf, address addr, const char* name, const TypePtr* adr_type)
723+
: CallJavaNode(tf, addr, NULL) {
726724
init_class_id(Class_CallStaticJava);
727725
// This node calls a runtime stub, which often has narrow memory effects.
728726
_adr_type = adr_type;
@@ -760,7 +758,8 @@ class CallDynamicJavaNode : public CallJavaNode {
760758
virtual bool cmp( const Node &n ) const;
761759
virtual uint size_of() const; // Size is bigger
762760
public:
763-
CallDynamicJavaNode( const TypeFunc *tf , address addr, ciMethod* method, int vtable_index, int bci ) : CallJavaNode(tf,addr,method,bci), _vtable_index(vtable_index) {
761+
CallDynamicJavaNode(const TypeFunc* tf , address addr, ciMethod* method, int vtable_index)
762+
: CallJavaNode(tf,addr,method), _vtable_index(vtable_index) {
764763
init_class_id(Class_CallDynamicJava);
765764
}
766765

src/hotspot/share/opto/graphKit.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,8 +2495,7 @@ Node* GraphKit::make_runtime_call(int flags,
24952495
}
24962496
CallNode* call;
24972497
if (!is_leaf) {
2498-
call = new CallStaticJavaNode(call_type, call_addr, call_name,
2499-
bci(), adr_type);
2498+
call = new CallStaticJavaNode(call_type, call_addr, call_name, adr_type);
25002499
} else if (flags & RC_NO_FP) {
25012500
call = new CallLeafNoFPNode(call_type, call_addr, call_name, adr_type);
25022501
} else {

src/hotspot/share/opto/library_call.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3588,8 +3588,7 @@ LibraryCallKit::generate_method_call(vmIntrinsics::ID method_id, bool is_virtual
35883588
if (is_static) {
35893589
assert(!is_virtual, "");
35903590
slow_call = new CallStaticJavaNode(C, tf,
3591-
SharedRuntime::get_resolve_static_call_stub(),
3592-
method, bci());
3591+
SharedRuntime::get_resolve_static_call_stub(), method);
35933592
} else if (is_virtual) {
35943593
null_check_receiver();
35953594
int vtable_index = Method::invalid_vtable_index;
@@ -3605,12 +3604,11 @@ LibraryCallKit::generate_method_call(vmIntrinsics::ID method_id, bool is_virtual
36053604
}
36063605
slow_call = new CallDynamicJavaNode(tf,
36073606
SharedRuntime::get_resolve_virtual_call_stub(),
3608-
method, vtable_index, bci());
3607+
method, vtable_index);
36093608
} else { // neither virtual nor static: opt_virtual
36103609
null_check_receiver();
36113610
slow_call = new CallStaticJavaNode(C, tf,
3612-
SharedRuntime::get_resolve_opt_virtual_call_stub(),
3613-
method, bci());
3611+
SharedRuntime::get_resolve_opt_virtual_call_stub(), method);
36143612
slow_call->set_optimized_virtual(true);
36153613
}
36163614
if (CallGenerator::is_inlined_method_handle_intrinsic(this->method(), bci(), callee())) {

src/hotspot/share/opto/loopnode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ void PhaseIdealLoop::add_empty_predicate(Deoptimization::DeoptReason reason, Nod
568568
const TypePtr* no_memory_effects = NULL;
569569
JVMState* jvms = sfpt->jvms();
570570
CallNode* unc = new CallStaticJavaNode(OptoRuntime::uncommon_trap_Type(), call_addr, "uncommon_trap",
571-
jvms->bci(), no_memory_effects);
571+
no_memory_effects);
572572

573573
Node* mem = NULL;
574574
Node* i_o = NULL;

src/hotspot/share/opto/machnode.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,6 @@ class MachCallJavaNode : public MachCallNode {
925925
public:
926926
ciMethod* _method; // Method being direct called
927927
bool _override_symbolic_info; // Override symbolic call site info from bytecode
928-
int _bci; // Byte Code index of call byte code
929928
bool _optimized_virtual; // Tells if node is a static call or an optimized virtual
930929
bool _method_handle_invoke; // Tells if the call has to preserve SP
931930
bool _arg_escape; // ArgEscape in parameter list

src/hotspot/share/opto/macro.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ CallNode* PhaseMacroExpand::make_slow_call(CallNode *oldcall, const TypeFunc* sl
140140
// Slow-path call
141141
CallNode *call = leaf_name
142142
? (CallNode*)new CallLeafNode ( slow_call_type, slow_call, leaf_name, TypeRawPtr::BOTTOM )
143-
: (CallNode*)new CallStaticJavaNode( slow_call_type, slow_call, OptoRuntime::stub_name(slow_call), oldcall->jvms()->bci(), TypeRawPtr::BOTTOM );
143+
: (CallNode*)new CallStaticJavaNode( slow_call_type, slow_call, OptoRuntime::stub_name(slow_call), TypeRawPtr::BOTTOM );
144144

145145
// Slow path call has no side-effects, uses few values
146146
copy_predefined_input_for_runtime_call(slow_path, oldcall, call );
@@ -1424,7 +1424,6 @@ void PhaseMacroExpand::expand_allocate_common(
14241424
// Generate slow-path call
14251425
CallNode *call = new CallStaticJavaNode(slow_call_type, slow_call_address,
14261426
OptoRuntime::stub_name(slow_call_address),
1427-
alloc->jvms()->bci(),
14281427
TypePtr::BOTTOM);
14291428
call->init_req(TypeFunc::Control, slow_region);
14301429
call->init_req(TypeFunc::I_O, top()); // does no i/o

src/hotspot/share/opto/macroArrayCopy.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,8 +1046,7 @@ MergeMemNode* PhaseMacroExpand::generate_slow_arraycopy(ArrayCopyNode *ac,
10461046

10471047
const TypeFunc* call_type = OptoRuntime::slow_arraycopy_Type();
10481048
CallNode* call = new CallStaticJavaNode(call_type, OptoRuntime::slow_arraycopy_Java(),
1049-
"slow_arraycopy",
1050-
ac->jvms()->bci(), TypePtr::BOTTOM);
1049+
"slow_arraycopy", TypePtr::BOTTOM);
10511050

10521051
call->init_req(TypeFunc::Control, *ctrl);
10531052
call->init_req(TypeFunc::I_O , *io);

src/hotspot/share/opto/matcher.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,6 @@ MachNode *Matcher::match_sfpt( SafePointNode *sfpt ) {
12471247
assert(call_java->validate_symbolic_info(), "inconsistent info");
12481248
method = call_java->method();
12491249
mcall_java->_method = method;
1250-
mcall_java->_bci = call_java->_bci;
12511250
mcall_java->_optimized_virtual = call_java->is_optimized_virtual();
12521251
is_method_handle_invoke = call_java->is_method_handle_invoke();
12531252
mcall_java->_method_handle_invoke = is_method_handle_invoke;

src/hotspot/share/opto/stringopts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class StringConcat : public ResourceObj {
233233
const TypePtr* no_memory_effects = NULL;
234234
Compile* C = _stringopts->C;
235235
CallStaticJavaNode* call = new CallStaticJavaNode(call_type, call_addr, "uncommon_trap",
236-
jvms->bci(), no_memory_effects);
236+
no_memory_effects);
237237
for (int e = 0; e < TypeFunc::Parms; e++) {
238238
call->init_req(e, uct->in(e));
239239
}

src/hotspot/share/opto/vectornode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ class VectorBoxNode : public Node {
13391339
class VectorBoxAllocateNode : public CallStaticJavaNode {
13401340
public:
13411341
VectorBoxAllocateNode(Compile* C, const TypeInstPtr* vbox_type)
1342-
: CallStaticJavaNode(C, VectorBoxNode::vec_box_type(vbox_type), NULL, NULL, -1) {
1342+
: CallStaticJavaNode(C, VectorBoxNode::vec_box_type(vbox_type), NULL, NULL) {
13431343
init_flags(Flag_is_macro);
13441344
C->add_macro_node(this);
13451345
}

src/hotspot/share/runtime/vmStructs.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,6 @@ typedef HashtableEntry<InstanceKlass*, mtClass> KlassHashtableEntry;
960960
c2_nonstatic_field(CallStaticJavaNode, _name, const char*) \
961961
\
962962
c2_nonstatic_field(MachCallJavaNode, _method, ciMethod*) \
963-
c2_nonstatic_field(MachCallJavaNode, _bci, int) \
964963
\
965964
c2_nonstatic_field(MachCallStaticJavaNode, _name, const char*) \
966965
\

0 commit comments

Comments
 (0)