Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions src/hotspot/share/opto/compile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,16 @@ class Compile : public Phase {
bool _merge_stores_phase; // Phase for merging stores, after post loop opts phase.
bool _allow_macro_nodes; // True if we allow creation of macro nodes.

int _major_progress; // Count of something big happening
/* If major progress is set:
* Marks that the loop tree information (get_ctrl, idom, get_loop, etc.) could be invalid, and we need to rebuild the loop tree.
* It also indicates that the graph was changed in a way that is promising to be able to apply more loop optimization.
* If major progress is not set:
* Loop tree information is valid.
* If major progress is not set at the end of a loop opts phase, then we can stop loop opts, because we do not expect any further progress if we did more loop opts phases.
*
* This is not 100% accurate, the semantics of major progress has become less clear over time, but this is the general idea.
*/
bool _major_progress;
bool _inlining_progress; // progress doing incremental inlining?
bool _inlining_incrementally;// Are we doing incremental inlining (post parse)
bool _do_cleanup; // Cleanup is needed before proceeding with incremental inlining
Expand Down Expand Up @@ -583,16 +592,16 @@ class Compile : public Phase {
// Control of this compilation.
int fixed_slots() const { assert(_fixed_slots >= 0, ""); return _fixed_slots; }
void set_fixed_slots(int n) { _fixed_slots = n; }
int major_progress() const { return _major_progress; }
void set_inlining_progress(bool z) { _inlining_progress = z; }
int inlining_progress() const { return _inlining_progress; }
void set_inlining_incrementally(bool z) { _inlining_incrementally = z; }
int inlining_incrementally() const { return _inlining_incrementally; }
void set_do_cleanup(bool z) { _do_cleanup = z; }
int do_cleanup() const { return _do_cleanup; }
void set_major_progress() { _major_progress++; }
void restore_major_progress(int progress) { _major_progress += progress; }
void clear_major_progress() { _major_progress = 0; }
bool major_progress() const { return _major_progress; }
void set_major_progress() { _major_progress = true; }
void restore_major_progress(bool progress) { _major_progress = _major_progress || progress; }
void clear_major_progress() { _major_progress = false; }
int max_inline_size() const { return _max_inline_size; }
void set_freq_inline_size(int n) { _freq_inline_size = n; }
int freq_inline_size() const { return _freq_inline_size; }
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/loopnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4934,7 +4934,7 @@ void PhaseIdealLoop::build_and_optimize() {
bool do_max_unroll = (_mode == LoopOptsMaxUnroll);


int old_progress = C->major_progress();
bool old_progress = C->major_progress();
uint orig_worklist_size = _igvn._worklist.size();

// Reset major-progress flag for the driver's heuristics
Expand Down Expand Up @@ -5315,7 +5315,7 @@ void PhaseIdealLoop::print_statistics() {
// Build a verify-only PhaseIdealLoop, and see that it agrees with "this".
void PhaseIdealLoop::verify() const {
ResourceMark rm;
int old_progress = C->major_progress();
bool old_progress = C->major_progress();
bool success = true;

PhaseIdealLoop phase_verify(_igvn, this);
Expand Down