8260577: Unused code in AbstractCompiler after Shark compiler removal

Reviewed-by: shade, chagedorn, kvn
This commit is contained in:
Tobias Hartmann 2021-02-01 06:33:08 +00:00
parent 8a9004da9b
commit 039affc8bc
4 changed files with 3 additions and 19 deletions

View File

@ -43,10 +43,6 @@ class Compiler: public AbstractCompiler {
// Name of this compiler
virtual const char* name() { return "C1"; }
// Missing feature tests
virtual bool supports_native() { return true; }
virtual bool supports_osr () { return true; }
// Initialization
virtual void initialize();

View File

@ -100,11 +100,6 @@ class AbstractCompiler : public CHeapObj<mtCompiler> {
// Name of this compiler
virtual const char* name() = 0;
// Missing feature tests
virtual bool supports_native() { return true; }
virtual bool supports_osr () { return true; }
virtual bool can_compile_method(const methodHandle& method) { return true; }
// Determine if the current compiler provides an intrinsic
// for method 'method'. An intrinsic is available if:
// - the intrinsic is enabled (by using the appropriate command-line flag,
@ -170,7 +165,6 @@ class AbstractCompiler : public CHeapObj<mtCompiler> {
ShouldNotReachHere();
}
// Print compilation timers and statistics
virtual void print_timers() {
ShouldNotReachHere();

View File

@ -1382,8 +1382,7 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci,
// lock, make sure that the compilation
// isn't prohibited in a straightforward way.
AbstractCompiler* comp = CompileBroker::compiler(comp_level);
if (comp == NULL || !comp->can_compile_method(method) ||
compilation_is_prohibited(method, osr_bci, comp_level, directive->ExcludeOption)) {
if (comp == NULL || compilation_is_prohibited(method, osr_bci, comp_level, directive->ExcludeOption)) {
return NULL;
}
@ -1560,16 +1559,14 @@ bool CompileBroker::compilation_is_prohibited(const methodHandle& method, int os
bool is_native = method->is_native();
// Some compilers may not support the compilation of natives.
AbstractCompiler *comp = compiler(comp_level);
if (is_native &&
(!CICompileNatives || comp == NULL || !comp->supports_native())) {
if (is_native && (!CICompileNatives || comp == NULL)) {
method->set_not_compilable_quietly("native methods not supported", comp_level);
return true;
}
bool is_osr = (osr_bci != standard_entry_bci);
// Some compilers may not support on stack replacement.
if (is_osr &&
(!CICompileOSR || comp == NULL || !comp->supports_osr())) {
if (is_osr && (!CICompileOSR || comp == NULL)) {
method->set_not_osr_compilable("OSR not supported", comp_level);
return true;
}

View File

@ -67,9 +67,6 @@ public:
virtual const char* name() { return UseJVMCINativeLibrary ? "JVMCI-native" : "JVMCI"; }
virtual bool supports_native() { return true; }
virtual bool supports_osr () { return true; }
bool is_jvmci() { return true; }
bool is_c1 () { return false; }
bool is_c2 () { return false; }