Skip to content

Commit

Permalink
8260577: Unused code in AbstractCompiler after Shark compiler removal
Browse files Browse the repository at this point in the history
Reviewed-by: shade, chagedorn, kvn
  • Loading branch information
TobiHartmann committed Feb 1, 2021
1 parent 8a9004d commit 039affc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
4 changes: 0 additions & 4 deletions src/hotspot/share/c1/c1_Compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/share/compiler/abstractCompiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -170,7 +165,6 @@ class AbstractCompiler : public CHeapObj<mtCompiler> {
ShouldNotReachHere();
}


// Print compilation timers and statistics
virtual void print_timers() {
ShouldNotReachHere();
Expand Down
9 changes: 3 additions & 6 deletions src/hotspot/share/compiler/compileBroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/jvmci/jvmciCompiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ class JVMCICompiler : public AbstractCompiler {

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; }
Expand Down

0 comments on commit 039affc

Please sign in to comment.