8255120: C2: assert(outer->outcnt() >= phis + 2 && outer->outcnt() <= phis + 2 + stores + 1) failed: only phis
Reviewed-by: thartmann
This commit is contained in:
parent
5926d75fa1
commit
0148adf20e
@ -47,6 +47,8 @@ bool ShenandoahBarrierC2Support::expand(Compile* C, PhaseIterGVN& igvn) {
|
|||||||
ShenandoahBarrierSetC2State* state = ShenandoahBarrierSetC2::bsc2()->state();
|
ShenandoahBarrierSetC2State* state = ShenandoahBarrierSetC2::bsc2()->state();
|
||||||
if ((state->enqueue_barriers_count() +
|
if ((state->enqueue_barriers_count() +
|
||||||
state->load_reference_barriers_count()) > 0) {
|
state->load_reference_barriers_count()) > 0) {
|
||||||
|
assert(C->post_loop_opts_phase(), "no loop opts allowed");
|
||||||
|
C->reset_post_loop_opts_phase(); // ... but we know what we are doing
|
||||||
bool attempt_more_loopopts = ShenandoahLoopOptsAfterExpansion;
|
bool attempt_more_loopopts = ShenandoahLoopOptsAfterExpansion;
|
||||||
C->clear_major_progress();
|
C->clear_major_progress();
|
||||||
PhaseIdealLoop::optimize(igvn, LoopOptsShenandoahExpand);
|
PhaseIdealLoop::optimize(igvn, LoopOptsShenandoahExpand);
|
||||||
@ -59,7 +61,10 @@ bool ShenandoahBarrierC2Support::expand(Compile* C, PhaseIterGVN& igvn) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
C->clear_major_progress();
|
C->clear_major_progress();
|
||||||
|
|
||||||
|
C->process_for_post_loop_opts_igvn(igvn);
|
||||||
}
|
}
|
||||||
|
C->set_post_loop_opts_phase(); // now for real!
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1834,16 +1834,21 @@ void Compile::remove_from_post_loop_opts_igvn(Node* n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Compile::process_for_post_loop_opts_igvn(PhaseIterGVN& igvn) {
|
void Compile::process_for_post_loop_opts_igvn(PhaseIterGVN& igvn) {
|
||||||
if (_for_post_loop_igvn.length() == 0) {
|
// Verify that all previous optimizations produced a valid graph
|
||||||
return; // no work to do
|
// at least to this point, even if no loop optimizations were done.
|
||||||
|
PhaseIdealLoop::verify(igvn);
|
||||||
|
|
||||||
|
C->set_post_loop_opts_phase(); // no more loop opts allowed
|
||||||
|
|
||||||
|
if (_for_post_loop_igvn.length() > 0) {
|
||||||
|
while (_for_post_loop_igvn.length() > 0) {
|
||||||
|
Node* n = _for_post_loop_igvn.pop();
|
||||||
|
n->remove_flag(Node::NodeFlags::Flag_for_post_loop_opts_igvn);
|
||||||
|
igvn._worklist.push(n);
|
||||||
|
}
|
||||||
|
igvn.optimize();
|
||||||
|
assert(_for_post_loop_igvn.length() == 0, "no more delayed nodes allowed");
|
||||||
}
|
}
|
||||||
while (_for_post_loop_igvn.length() > 0) {
|
|
||||||
Node* n = _for_post_loop_igvn.pop();
|
|
||||||
n->remove_flag(Node::NodeFlags::Flag_for_post_loop_opts_igvn);
|
|
||||||
igvn._worklist.push(n);
|
|
||||||
}
|
|
||||||
igvn.optimize();
|
|
||||||
assert(_for_post_loop_igvn.length() == 0, "no more delayed nodes allowed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// StringOpts and late inlining of string methods
|
// StringOpts and late inlining of string methods
|
||||||
@ -2252,7 +2257,6 @@ void Compile::Optimize() {
|
|||||||
}
|
}
|
||||||
if (!failing()) {
|
if (!failing()) {
|
||||||
// Verify that last round of loop opts produced a valid graph
|
// Verify that last round of loop opts produced a valid graph
|
||||||
TracePhase tp("idealLoopVerify", &timers[_t_idealLoopVerify]);
|
|
||||||
PhaseIdealLoop::verify(igvn);
|
PhaseIdealLoop::verify(igvn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2287,15 +2291,9 @@ void Compile::Optimize() {
|
|||||||
|
|
||||||
if (failing()) return;
|
if (failing()) return;
|
||||||
|
|
||||||
// Ensure that major progress is now clear
|
C->clear_major_progress(); // ensure that major progress is now clear
|
||||||
C->clear_major_progress();
|
|
||||||
|
|
||||||
{
|
process_for_post_loop_opts_igvn(igvn);
|
||||||
// Verify that all previous optimizations produced a valid graph
|
|
||||||
// at least to this point, even if no loop optimizations were done.
|
|
||||||
TracePhase tp("idealLoopVerify", &timers[_t_idealLoopVerify]);
|
|
||||||
PhaseIdealLoop::verify(igvn);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
bs->verify_gc_barriers(this, BarrierSetC2::BeforeMacroExpand);
|
bs->verify_gc_barriers(this, BarrierSetC2::BeforeMacroExpand);
|
||||||
@ -2320,10 +2318,6 @@ void Compile::Optimize() {
|
|||||||
print_method(PHASE_BARRIER_EXPANSION, 2);
|
print_method(PHASE_BARRIER_EXPANSION, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
C->set_post_loop_opts_phase(); // no more loop opts allowed
|
|
||||||
|
|
||||||
process_for_post_loop_opts_igvn(igvn);
|
|
||||||
|
|
||||||
if (C->max_vector_size() > 0) {
|
if (C->max_vector_size() > 0) {
|
||||||
C->optimize_logic_cones(igvn);
|
C->optimize_logic_cones(igvn);
|
||||||
igvn.optimize();
|
igvn.optimize();
|
||||||
|
@ -689,8 +689,9 @@ class Compile : public Phase {
|
|||||||
_predicate_opaqs.append(n);
|
_predicate_opaqs.append(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool post_loop_opts_phase() { return _post_loop_opts_phase; }
|
bool post_loop_opts_phase() { return _post_loop_opts_phase; }
|
||||||
void set_post_loop_opts_phase() { _post_loop_opts_phase = true; }
|
void set_post_loop_opts_phase() { _post_loop_opts_phase = true; }
|
||||||
|
void reset_post_loop_opts_phase() { _post_loop_opts_phase = false; }
|
||||||
|
|
||||||
void record_for_post_loop_opts_igvn(Node* n);
|
void record_for_post_loop_opts_igvn(Node* n);
|
||||||
void remove_from_post_loop_opts_igvn(Node* n);
|
void remove_from_post_loop_opts_igvn(Node* n);
|
||||||
|
@ -1132,6 +1132,7 @@ public:
|
|||||||
static void verify(PhaseIterGVN& igvn) {
|
static void verify(PhaseIterGVN& igvn) {
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
|
Compile::TracePhase tp("idealLoopVerify", &timers[_t_idealLoopVerify]);
|
||||||
PhaseIdealLoop v(igvn);
|
PhaseIdealLoop v(igvn);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -64,8 +64,6 @@ compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java 8183263 generic-x64
|
|||||||
|
|
||||||
compiler/c2/Test8004741.java 8235801 generic-all
|
compiler/c2/Test8004741.java 8235801 generic-all
|
||||||
|
|
||||||
compiler/loopstripmining/BackedgeNodeWithOutOfLoopControl.java 8255120 generic-all
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
# :hotspot_gc
|
# :hotspot_gc
|
||||||
|
Loading…
Reference in New Issue
Block a user