Skip to content

Commit adba98e

Browse files
author
thartmann
committed
8242108: Performance regression after fix for JDK-8229496
Summary: Backed out the fix for 8229496. Reviewed-by: kvn, roland
1 parent f425fbe commit adba98e

File tree

15 files changed

+105
-159
lines changed

15 files changed

+105
-159
lines changed

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7916,17 +7916,6 @@ instruct castII(iRegI dst)
79167916
ins_pipe(pipe_class_empty);
79177917
%}
79187918

7919-
instruct castLL(iRegL dst)
7920-
%{
7921-
match(Set dst (CastLL dst));
7922-
7923-
size(0);
7924-
format %{ "# castLL of $dst" %}
7925-
ins_encode(/* empty encoding */);
7926-
ins_cost(0);
7927-
ins_pipe(pipe_class_empty);
7928-
%}
7929-
79307919
// ============================================================================
79317920
// Atomic operation instructions
79327921
//

src/hotspot/cpu/arm/arm.ad

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6901,14 +6901,6 @@ instruct castII( iRegI dst ) %{
69016901
ins_pipe(empty);
69026902
%}
69036903

6904-
instruct castLL( iRegL dst ) %{
6905-
match(Set dst (CastLL dst));
6906-
format %{ "! castLL of $dst" %}
6907-
ins_encode( /*empty encoding*/ );
6908-
ins_cost(0);
6909-
ins_pipe(empty);
6910-
%}
6911-
69126904
//----------Arithmetic Instructions--------------------------------------------
69136905
// Addition Instructions
69146906
// Register Addition

src/hotspot/cpu/ppc/ppc.ad

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10821,14 +10821,6 @@ instruct castII(iRegIdst dst) %{
1082110821
ins_pipe(pipe_class_default);
1082210822
%}
1082310823

10824-
instruct castLL(iRegLdst dst) %{
10825-
match(Set dst (CastLL dst));
10826-
format %{ " -- \t// castLL of $dst" %}
10827-
size(0);
10828-
ins_encode( /*empty*/ );
10829-
ins_pipe(pipe_class_default);
10830-
%}
10831-
1083210824
instruct checkCastPP(iRegPdst dst) %{
1083310825
match(Set dst (CheckCastPP dst));
1083410826
format %{ " -- \t// checkcastPP of $dst" %}

src/hotspot/cpu/s390/s390.ad

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5371,14 +5371,6 @@ instruct castII(iRegI dst) %{
53715371
ins_pipe(pipe_class_dummy);
53725372
%}
53735373

5374-
instruct castLL(iRegL dst) %{
5375-
match(Set dst (CastLL dst));
5376-
size(0);
5377-
format %{ "# castLL of $dst" %}
5378-
ins_encode(/*empty*/);
5379-
ins_pipe(pipe_class_dummy);
5380-
%}
5381-
53825374

53835375
//----------Conditional_store--------------------------------------------------
53845376
// Conditional-store of the updated heap-top.

src/hotspot/cpu/sparc/sparc.ad

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6812,14 +6812,6 @@ instruct castII( iRegI dst ) %{
68126812
ins_pipe(empty);
68136813
%}
68146814

6815-
instruct castLL( iRegL dst ) %{
6816-
match(Set dst (CastLL dst));
6817-
format %{ "# castLL of $dst" %}
6818-
ins_encode( /*empty encoding*/ );
6819-
ins_cost(0);
6820-
ins_pipe(empty);
6821-
%}
6822-
68236815
//----------Arithmetic Instructions--------------------------------------------
68246816
// Addition Instructions
68256817
// Register Addition

src/hotspot/cpu/x86/x86_32.ad

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7324,15 +7324,6 @@ instruct castII( rRegI dst ) %{
73247324
ins_pipe( empty );
73257325
%}
73267326

7327-
instruct castLL( eRegL dst ) %{
7328-
match(Set dst (CastLL dst));
7329-
format %{ "#castLL of $dst" %}
7330-
ins_encode( /*empty encoding*/ );
7331-
ins_cost(0);
7332-
ins_pipe( empty );
7333-
%}
7334-
7335-
73367327
// Load-locked - same as a regular pointer load when used with compare-swap
73377328
instruct loadPLocked(eRegP dst, memory mem) %{
73387329
match(Set dst (LoadPLocked mem));

src/hotspot/cpu/x86/x86_64.ad

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7489,17 +7489,6 @@ instruct castII(rRegI dst)
74897489
ins_pipe(empty);
74907490
%}
74917491

7492-
instruct castLL(rRegL dst)
7493-
%{
7494-
match(Set dst (CastLL dst));
7495-
7496-
size(0);
7497-
format %{ "# castLL of $dst" %}
7498-
ins_encode(/* empty encoding */);
7499-
ins_cost(0);
7500-
ins_pipe(empty);
7501-
%}
7502-
75037492
// LoadP-locked same as a regular LoadP when used with compare-swap
75047493
instruct loadPLocked(rRegP dst, memory mem)
75057494
%{

src/hotspot/share/opto/castnode.cpp

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@ const Type* ConstraintCastNode::Value(PhaseGVN* phase) const {
6363
if (rt->empty()) assert(ft == Type::TOP, "special case #2");
6464
break;
6565
}
66-
case Op_CastLL:
67-
{
68-
const Type* t1 = phase->type(in(1));
69-
if (t1 == Type::TOP) assert(ft == Type::TOP, "special case #1");
70-
const Type* rt = t1->join_speculative(_type);
71-
if (rt->empty()) assert(ft == Type::TOP, "special case #2");
72-
break;
73-
}
7466
case Op_CastPP:
7567
if (phase->type(in(1)) == TypePtr::NULL_PTR &&
7668
_type->isa_ptr() && _type->is_ptr()->_ptr == TypePtr::NotNull)
@@ -104,11 +96,6 @@ Node* ConstraintCastNode::make_cast(int opcode, Node* c, Node *n, const Type *t,
10496
cast->set_req(0, c);
10597
return cast;
10698
}
107-
case Op_CastLL: {
108-
Node* cast = new CastLLNode(n, t, carry_dependency);
109-
cast->set_req(0, c);
110-
return cast;
111-
}
11299
case Op_CastPP: {
113100
Node* cast = new CastPPNode(n, t, carry_dependency);
114101
cast->set_req(0, c);
@@ -292,45 +279,6 @@ void CastIINode::dump_spec(outputStream* st) const {
292279
}
293280
#endif
294281

295-
Node* CastLLNode::Ideal(PhaseGVN* phase, bool can_reshape) {
296-
Node* progress = ConstraintCastNode::Ideal(phase, can_reshape);
297-
if (progress != NULL) {
298-
return progress;
299-
}
300-
301-
// Same as in CastIINode::Ideal but for TypeLong instead of TypeInt
302-
if (can_reshape && !phase->C->major_progress()) {
303-
const TypeLong* this_type = this->type()->is_long();
304-
const TypeLong* in_type = phase->type(in(1))->isa_long();
305-
if (in_type != NULL && this_type != NULL &&
306-
(in_type->_lo != this_type->_lo ||
307-
in_type->_hi != this_type->_hi)) {
308-
jlong lo1 = this_type->_lo;
309-
jlong hi1 = this_type->_hi;
310-
int w1 = this_type->_widen;
311-
312-
if (lo1 >= 0) {
313-
// Keep a range assertion of >=0.
314-
lo1 = 0; hi1 = max_jlong;
315-
} else if (hi1 < 0) {
316-
// Keep a range assertion of <0.
317-
lo1 = min_jlong; hi1 = -1;
318-
} else {
319-
lo1 = min_jlong; hi1 = max_jlong;
320-
}
321-
const TypeLong* wtype = TypeLong::make(MAX2(in_type->_lo, lo1),
322-
MIN2(in_type->_hi, hi1),
323-
MAX2((int)in_type->_widen, w1));
324-
if (wtype != type()) {
325-
set_type(wtype);
326-
return this;
327-
}
328-
}
329-
}
330-
return NULL;
331-
}
332-
333-
334282
//=============================================================================
335283
//------------------------------Identity---------------------------------------
336284
// If input is already higher or equal to cast type, then this is an identity.

src/hotspot/share/opto/castnode.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,6 @@ class CastIINode: public ConstraintCastNode {
9191
#endif
9292
};
9393

94-
//------------------------------CastLLNode-------------------------------------
95-
// cast long to long (different range)
96-
class CastLLNode: public ConstraintCastNode {
97-
public:
98-
CastLLNode(Node* n, const Type* t, bool carry_dependency = false)
99-
: ConstraintCastNode(n, t, carry_dependency) {
100-
init_class_id(Class_CastLL);
101-
}
102-
virtual int Opcode() const;
103-
virtual uint ideal_reg() const { return Op_RegL; }
104-
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
105-
};
106-
10794
//------------------------------CastPPNode-------------------------------------
10895
// cast pointer to pointer (different type)
10996
class CastPPNode: public ConstraintCastNode {

src/hotspot/share/opto/cfgnode.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,13 +1727,12 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
17271727
// Wait until after parsing for the type information to propagate from the casts.
17281728
assert(can_reshape, "Invalid during parsing");
17291729
const Type* phi_type = bottom_type();
1730-
assert(phi_type->isa_int() || phi_type->isa_long() || phi_type->isa_ptr(), "bad phi type");
1731-
// Add casts to carry the control dependency of the Phi that is going away
1730+
assert(phi_type->isa_int() || phi_type->isa_ptr(), "bad phi type");
1731+
// Add casts to carry the control dependency of the Phi that is
1732+
// going away
17321733
Node* cast = NULL;
17331734
if (phi_type->isa_int()) {
17341735
cast = ConstraintCastNode::make_cast(Op_CastII, r, uin, phi_type, true);
1735-
} else if (phi_type->isa_long()) {
1736-
cast = ConstraintCastNode::make_cast(Op_CastLL, r, uin, phi_type, true);
17371736
} else {
17381737
const Type* uin_type = phase->type(uin);
17391738
if (!phi_type->isa_oopptr() && !uin_type->isa_oopptr()) {

0 commit comments

Comments
 (0)