Skip to content

Commit 0567a84

Browse files
committedJan 24, 2022
8280457: Duplicate implementation of dprecision_rounding and dstore_rounding
Reviewed-by: vlivanov, shade
1 parent d156911 commit 0567a84

File tree

4 files changed

+11
-28
lines changed

4 files changed

+11
-28
lines changed
 

‎src/hotspot/share/gc/shared/c2/barrierSetC2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2022, 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
@@ -96,7 +96,7 @@ Node* BarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) cons
9696

9797
GraphKit* kit = parse_access.kit();
9898
if (access.type() == T_DOUBLE) {
99-
Node* new_val = kit->dstore_rounding(val.node());
99+
Node* new_val = kit->dprecision_rounding(val.node());
100100
val.set_node(new_val);
101101
}
102102

‎src/hotspot/share/opto/graphKit.cpp

+3-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2022, 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
@@ -2350,9 +2350,9 @@ void GraphKit::round_double_arguments(ciMethod* dest_method) {
23502350
const Type *targ = tf->domain()->field_at(j + TypeFunc::Parms);
23512351
if (targ->basic_type() == T_DOUBLE) {
23522352
// If any parameters are doubles, they must be rounded before
2353-
// the call, dstore_rounding does gvn.transform
2353+
// the call, dprecision_rounding does gvn.transform
23542354
Node *arg = argument(j);
2355-
arg = dstore_rounding(arg);
2355+
arg = dprecision_rounding(arg);
23562356
set_argument(j, arg);
23572357
}
23582358
}
@@ -2387,20 +2387,6 @@ Node* GraphKit::dprecision_rounding(Node *n) {
23872387
return n;
23882388
}
23892389

2390-
// rounding for non-strict double stores
2391-
Node* GraphKit::dstore_rounding(Node* n) {
2392-
if (Matcher::strict_fp_requires_explicit_rounding) {
2393-
#ifdef IA32
2394-
if (UseSSE < 2) {
2395-
return _gvn.transform(new RoundDoubleNode(0, n));
2396-
}
2397-
#else
2398-
Unimplemented();
2399-
#endif // IA32
2400-
}
2401-
return n;
2402-
}
2403-
24042390
//=============================================================================
24052391
// Generate a fast path/slow path idiom. Graph looks like:
24062392
// [foo] indicates that 'foo' is a parameter

‎src/hotspot/share/opto/graphKit.hpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2022, 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
@@ -790,9 +790,6 @@ class GraphKit : public Phase {
790790
// rounding for strict double precision conformance
791791
Node* dprecision_rounding(Node* n);
792792

793-
// rounding for non-strict double stores
794-
Node* dstore_rounding(Node* n);
795-
796793
// Helper functions for fast/slow path codes
797794
Node* opt_iff(Node* region, Node* iff);
798795
Node* make_runtime_call(int flags,

‎src/hotspot/share/opto/parse2.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -2004,19 +2004,19 @@ void Parse::do_one_bytecode() {
20042004

20052005
// double stores
20062006
case Bytecodes::_dstore_0:
2007-
set_pair_local( 0, dstore_rounding(pop_pair()) );
2007+
set_pair_local( 0, dprecision_rounding(pop_pair()) );
20082008
break;
20092009
case Bytecodes::_dstore_1:
2010-
set_pair_local( 1, dstore_rounding(pop_pair()) );
2010+
set_pair_local( 1, dprecision_rounding(pop_pair()) );
20112011
break;
20122012
case Bytecodes::_dstore_2:
2013-
set_pair_local( 2, dstore_rounding(pop_pair()) );
2013+
set_pair_local( 2, dprecision_rounding(pop_pair()) );
20142014
break;
20152015
case Bytecodes::_dstore_3:
2016-
set_pair_local( 3, dstore_rounding(pop_pair()) );
2016+
set_pair_local( 3, dprecision_rounding(pop_pair()) );
20172017
break;
20182018
case Bytecodes::_dstore:
2019-
set_pair_local( iter().get_index(), dstore_rounding(pop_pair()) );
2019+
set_pair_local( iter().get_index(), dprecision_rounding(pop_pair()) );
20202020
break;
20212021

20222022
case Bytecodes::_pop: dec_sp(1); break;

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Jan 24, 2022

@openjdk-notifier[bot]
Please sign in to comment.