8294014: Remove redundant UseCompiler conditions

Reviewed-by: kvn, thartmann
This commit is contained in:
Julian Waters 2022-09-20 12:22:18 +00:00 committed by Tobias Hartmann
parent 84ee1a291c
commit 0f28cb06ab
2 changed files with 3 additions and 3 deletions
src/hotspot/share/compiler

@ -83,7 +83,7 @@ bool CompilationPolicy::must_be_compiled(const methodHandle& m, int comp_level)
if (!can_be_compiled(m, comp_level)) return false;
return !UseInterpreter || // must compile all methods
(UseCompiler && AlwaysCompileLoopMethods && m->has_loops() && CompileBroker::should_compile_new_jobs()); // eagerly compile loop methods
(AlwaysCompileLoopMethods && m->has_loops() && CompileBroker::should_compile_new_jobs()); // eagerly compile loop methods
}
void CompilationPolicy::compile_if_required(const methodHandle& m, TRAPS) {

@ -331,8 +331,8 @@ public:
shutdown_compilation = 2
};
static jint get_compilation_activity_mode() { return _should_compile_new_jobs; }
static bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); }
static inline jint get_compilation_activity_mode() { return _should_compile_new_jobs; }
static inline bool should_compile_new_jobs() { return UseCompiler && (_should_compile_new_jobs == run_compilation); }
static bool set_should_compile_new_jobs(jint new_state) {
// Return success if the current caller set it
jint old = Atomic::cmpxchg(&_should_compile_new_jobs, 1-new_state, new_state);