--- old/src/share/vm/opto/compile.hpp 2016-02-22 15:17:21.897647643 +0100 +++ new/src/share/vm/opto/compile.hpp 2016-02-22 15:17:21.725647651 +0100 @@ -356,7 +356,14 @@ int _orig_pc_slot; int _orig_pc_slot_offset_in_bytes; - int _major_progress; // Count of something big happening + bool _major_progress; // Flag to indicate that the compiler expects loop optimizations to happen. + // The following convention guides the usage of _major_progress: + // - The flag can be SET when the compiler is initialized because loop + // optimizations are expected to happen afterwards; + // - The flag can be SET/RESET in the scope of loop optimizations so that + // it is possible to check if loop optimizations made progress; + // - The flag cannot be SET/RESET by neither incremental inlining nor (I)GVN, + // even if the (I)GVN is performed in the scope of loop optimizations. bool _inlining_progress; // progress doing incremental inlining? bool _inlining_incrementally;// Are we doing incremental inlining (post parse) bool _has_loops; // True if the method _may_ have some loops @@ -616,13 +623,13 @@ // 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; } + bool 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_major_progress() { _major_progress++; } - void clear_major_progress() { _major_progress = 0; } + void set_major_progress() { _major_progress = true; } + void clear_major_progress() { _major_progress = false; } int num_loop_opts() const { return _num_loop_opts; } void set_num_loop_opts(int n) { _num_loop_opts = n; } int max_inline_size() const { return _max_inline_size; }