Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8294014: Remove redundant UseCompiler conditions
Reviewed-by: kvn, thartmann
  • Loading branch information
TheShermanTanker authored and TobiHartmann committed Sep 20, 2022
1 parent 84ee1a2 commit 0f28cb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/compiler/compilationPolicy.cpp
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/compiler/compileBroker.hpp
Expand Up @@ -331,8 +331,8 @@ class CompileBroker: AllStatic {
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);
Expand Down

0 comments on commit 0f28cb0

Please sign in to comment.