Skip to content
Permalink
Browse files
8260577: Unused code in AbstractCompiler after Shark compiler removal
Reviewed-by: shade, chagedorn, kvn
  • Loading branch information
TobiHartmann committed Feb 1, 2021
1 parent 8a9004d commit 039affc8bcaa0c0223a13b22f299b547ac2e5ed8
@@ -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();

@@ -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();
@@ -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;
}
@@ -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; }

0 comments on commit 039affc

Please sign in to comment.