8332032: C2: Remove ExpandSubTypeCheckAtParseTime flag
Reviewed-by: thartmann, rcastanedalo
This commit is contained in:
parent
ba323b515d
commit
95c8a69b0e
@ -767,9 +767,6 @@
|
||||
product(bool, UseProfiledLoopPredicate, true, \
|
||||
"Move predicates out of loops based on profiling data") \
|
||||
\
|
||||
product(bool, ExpandSubTypeCheckAtParseTime, false, DIAGNOSTIC, \
|
||||
"Do not use subtype check macro node") \
|
||||
\
|
||||
develop(uintx, StressLongCountedLoop, 0, \
|
||||
"if > 0, convert int counted loops to long counted loops" \
|
||||
"to stress handling of long counted loops: run inner loop" \
|
||||
|
@ -2713,17 +2713,12 @@ Node* Phase::gen_subtype_check(Node* subklass, Node* superklass, Node** ctrl, No
|
||||
// Here, the type of 'fa' is often exact, so the store check
|
||||
// of fa[1]=x will fold up, without testing the nullness of x.
|
||||
//
|
||||
// Do not skip the static sub type check with StressReflectiveCode during
|
||||
// parsing (i.e. with ExpandSubTypeCheckAtParseTime) because the
|
||||
// associated CheckCastNodePP could already be folded when the type
|
||||
// system can prove it's an impossible type. Therefore, we should also
|
||||
// do the static sub type check here to ensure control is folded as well.
|
||||
// Otherwise, the graph is left in a broken state.
|
||||
// At macro expansion, we would have already folded the SubTypeCheckNode
|
||||
// being expanded here because we always perform the static sub type
|
||||
// check in SubTypeCheckNode::sub() regardless of whether
|
||||
// StressReflectiveCode is set or not.
|
||||
switch (C->static_subtype_check(superk, subk, !ExpandSubTypeCheckAtParseTime)) {
|
||||
// StressReflectiveCode is set or not. We can therefore skip this
|
||||
// static check when StressReflectiveCode is on.
|
||||
switch (C->static_subtype_check(superk, subk)) {
|
||||
case Compile::SSC_always_false:
|
||||
{
|
||||
Node* always_fail = *ctrl;
|
||||
@ -2904,8 +2899,7 @@ Node* Phase::gen_subtype_check(Node* subklass, Node* superklass, Node** ctrl, No
|
||||
}
|
||||
|
||||
Node* GraphKit::gen_subtype_check(Node* obj_or_subklass, Node* superklass) {
|
||||
bool expand_subtype_check = C->post_loop_opts_phase() || // macro node expansion is over
|
||||
ExpandSubTypeCheckAtParseTime; // forced expansion
|
||||
bool expand_subtype_check = C->post_loop_opts_phase(); // macro node expansion is over
|
||||
if (expand_subtype_check) {
|
||||
MergeMemNode* mem = merged_memory();
|
||||
Node* ctrl = control();
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Red Hat, Inc. All rights reserved.
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,7 +32,6 @@
|
||||
* @run main/othervm -XX:-BackgroundCompilation TestSubTypeCheckMacroTrichotomy
|
||||
* @run main/othervm -XX:-BackgroundCompilation
|
||||
* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressReflectiveCode
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime
|
||||
* -XX:-TieredCompilation -XX:CompileThreshold=100 TestSubTypeCheckMacroTrichotomy
|
||||
*
|
||||
*/
|
||||
|
@ -50,12 +50,10 @@
|
||||
* either against an interface or an unrelated non-sub-class.
|
||||
*
|
||||
* @run main/othervm -Xcomp -XX:CompileCommand=compileonly,compiler.types.TestSubTypeCheckWithBottomArray::test*
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime
|
||||
* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressReflectiveCode
|
||||
* -XX:CompileCommand=inline,compiler.types.TestSubTypeCheckWithBottomArray::check*
|
||||
* compiler.types.TestSubTypeCheckWithBottomArray
|
||||
* @run main/othervm -Xbatch -XX:CompileCommand=compileonly,compiler.types.TestSubTypeCheckWithBottomArray::test*
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime
|
||||
* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressReflectiveCode
|
||||
* -XX:CompileCommand=inline,compiler.types.TestSubTypeCheckWithBottomArray::check*
|
||||
* compiler.types.TestSubTypeCheckWithBottomArray
|
||||
|
Loading…
Reference in New Issue
Block a user