Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Commit ad45678

Browse files
committed
8258558: Revert changes for JDK-8252505 and related issues
Reviewed-by: kvn
1 parent e66187d commit ad45678

33 files changed

+2
-1662
lines changed

src/hotspot/share/c1/c1_Compiler.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ bool Compiler::is_intrinsic_supported(const methodHandle& method) {
230230
break;
231231
case vmIntrinsics::_getObjectSize:
232232
break;
233-
case vmIntrinsics::_blackhole:
234-
break;
235233
default:
236234
return false; // Intrinsics not on the previous list are not available.
237235
}

src/hotspot/share/c1/c1_GraphBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3415,7 +3415,7 @@ bool GraphBuilder::try_inline(ciMethod* callee, bool holder_known, bool ignore_r
34153415

34163416
// handle intrinsics
34173417
if (callee->intrinsic_id() != vmIntrinsics::_none &&
3418-
callee->check_intrinsic_candidate()) {
3418+
(CheckIntrinsics ? callee->intrinsic_candidate() : true)) {
34193419
if (try_inline_intrinsics(callee, ignore_return)) {
34203420
print_inlining(callee, "intrinsic");
34213421
if (callee->has_reserved_stack_access()) {

src/hotspot/share/c1/c1_LIRGenerator.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,10 +3206,6 @@ void LIRGenerator::do_Intrinsic(Intrinsic* x) {
32063206
do_vectorizedMismatch(x);
32073207
break;
32083208

3209-
case vmIntrinsics::_blackhole:
3210-
do_blackhole(x);
3211-
break;
3212-
32133209
default: ShouldNotReachHere(); break;
32143210
}
32153211
}
@@ -3629,23 +3625,6 @@ void LIRGenerator::do_RangeCheckPredicate(RangeCheckPredicate *x) {
36293625
}
36303626
}
36313627

3632-
void LIRGenerator::do_blackhole(Intrinsic *x) {
3633-
// If we have a receiver, then null-check and handle it separately
3634-
bool handle_receiver = x->needs_null_check();
3635-
if (handle_receiver) {
3636-
CodeEmitInfo* info = state_for(x);
3637-
LIRItem vitem(x->receiver(), this);
3638-
vitem.load_item();
3639-
__ null_check(vitem.result(), info);
3640-
}
3641-
3642-
for (int c = (handle_receiver ? 1 : 0); c < x->number_of_arguments(); c++) {
3643-
// Load the argument
3644-
LIRItem vitem(x->argument_at(c), this);
3645-
vitem.load_item();
3646-
// ...and leave it unused.
3647-
}
3648-
}
36493628

36503629
LIR_Opr LIRGenerator::call_runtime(Value arg1, address entry, ValueType* result_type, CodeEmitInfo* info) {
36513630
LIRItemList args(1);

src/hotspot/share/c1/c1_LIRGenerator.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
265265
void do_update_CRC32(Intrinsic* x);
266266
void do_update_CRC32C(Intrinsic* x);
267267
void do_vectorizedMismatch(Intrinsic* x);
268-
void do_blackhole(Intrinsic* x);
269268

270269
public:
271270
LIR_Opr call_runtime(BasicTypeArray* signature, LIRItemList* args, address entry, ValueType* result_type, CodeEmitInfo* info);

src/hotspot/share/ci/ciMethod.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,6 @@ ciMethod::ciMethod(const methodHandle& h_m, ciInstanceKlass* holder) :
155155
ciReplay::initialize(this);
156156
}
157157
#endif
158-
159-
if (CompilerOracle::should_blackhole(h_m)) {
160-
h_m->set_intrinsic_id(vmIntrinsics::_blackhole);
161-
}
162158
}
163159

164160

src/hotspot/share/ci/ciMethod.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,6 @@ class ciMethod : public ciMetadata {
201201
bool intrinsic_candidate() const { return get_Method()->intrinsic_candidate(); }
202202
bool is_static_initializer() const { return get_Method()->is_static_initializer(); }
203203

204-
bool check_intrinsic_candidate() const {
205-
if (intrinsic_id() == vmIntrinsics::_blackhole) {
206-
// This is the intrinsic without an associated method, so no intrinsic_candidate
207-
// flag is set. The intrinsic is still correct.
208-
return true;
209-
}
210-
return (CheckIntrinsics ? intrinsic_candidate() : true);
211-
}
212-
213204
int highest_osr_comp_level();
214205

215206
Bytecodes::Code java_code_at_bci(int bci) {

src/hotspot/share/classfile/classFileParser.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5308,11 +5308,6 @@ static void check_methods_for_intrinsics(const InstanceKlass* ik,
53085308
// is defined for it.
53095309
continue;
53105310
}
5311-
if (vmIntrinsics::_blackhole == id) {
5312-
// The _blackhole intrinsic is a special marker. No explicit method
5313-
// is defined for it.
5314-
continue;
5315-
}
53165311

53175312
if (vmIntrinsics::class_for(id) == klass_id) {
53185313
// Check if the current class contains a method with the same

src/hotspot/share/classfile/vmIntrinsics.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ bool vmIntrinsics::should_be_pinned(vmIntrinsics::ID id) {
151151
#endif
152152
case vmIntrinsics::_currentTimeMillis:
153153
case vmIntrinsics::_nanoTime:
154-
case vmIntrinsics::_blackhole:
155154
return true;
156155
default:
157156
return false;

src/hotspot/share/classfile/vmIntrinsics.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,6 @@ class methodHandle;
534534
do_name( getObjectSize_name, "getObjectSize0") \
535535
do_alias( getObjectSize_signature, long_object_long_signature) \
536536
\
537-
/* special marker for blackholed methods: */ \
538-
do_intrinsic(_blackhole, java_lang_Object, blackhole_name, star_name, F_S) \
539-
\
540537
/* unsafe memory references (there are a lot of them...) */ \
541538
do_signature(getReference_signature, "(Ljava/lang/Object;J)Ljava/lang/Object;") \
542539
do_signature(putReference_signature, "(Ljava/lang/Object;JLjava/lang/Object;)V") \

src/hotspot/share/classfile/vmSymbols.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@
283283
template(signature_name, "signature") \
284284
template(slot_name, "slot") \
285285
template(trusted_final_name, "trustedFinal") \
286-
template(blackhole_name, "<blackhole>") /*fake name*/ \
287286
\
288287
/* Support for annotations (JDK 1.5 and above) */ \
289288
\

0 commit comments

Comments
 (0)