8318445: More broken bailout chains in C2
Reviewed-by: kvn, epeter
This commit is contained in:
parent
d888b26783
commit
c1aeac79ba
src/hotspot/share/opto
@ -1854,6 +1854,7 @@ void Compile::process_for_post_loop_opts_igvn(PhaseIterGVN& igvn) {
|
||||
igvn._worklist.push(n);
|
||||
}
|
||||
igvn.optimize();
|
||||
if (failing()) return;
|
||||
assert(_for_post_loop_igvn.length() == 0, "no more delayed nodes allowed");
|
||||
assert(C->parse_predicate_count() == 0, "all parse predicates should have been removed now");
|
||||
|
||||
@ -2069,6 +2070,7 @@ void Compile::inline_incrementally_cleanup(PhaseIterGVN& igvn) {
|
||||
TracePhase tp("incrementalInline_igvn", &timers[_t_incrInline_igvn]);
|
||||
igvn.reset_from_gvn(initial_gvn());
|
||||
igvn.optimize();
|
||||
if (failing()) return;
|
||||
}
|
||||
print_method(PHASE_INCREMENTAL_INLINE_CLEANUP, 3);
|
||||
}
|
||||
@ -2301,6 +2303,7 @@ void Compile::Optimize() {
|
||||
}
|
||||
igvn.reset_from_gvn(initial_gvn());
|
||||
igvn.optimize();
|
||||
if (failing()) return;
|
||||
}
|
||||
|
||||
// Now that all inlining is over and no PhaseRemoveUseless will run, cut edge from root to loop
|
||||
@ -2330,7 +2333,7 @@ void Compile::Optimize() {
|
||||
igvn.optimize();
|
||||
print_method(PHASE_ITER_GVN_AFTER_EA, 2);
|
||||
|
||||
if (failing()) return;
|
||||
if (failing()) return;
|
||||
|
||||
if (congraph() != nullptr && macro_count() > 0) {
|
||||
TracePhase tp("macroEliminate", &timers[_t_macroEliminate]);
|
||||
@ -2340,6 +2343,8 @@ void Compile::Optimize() {
|
||||
|
||||
igvn.set_delay_transform(false);
|
||||
igvn.optimize();
|
||||
if (failing()) return;
|
||||
|
||||
print_method(PHASE_ITER_GVN_AFTER_ELIMINATION, 2);
|
||||
}
|
||||
|
||||
@ -2449,6 +2454,7 @@ void Compile::Optimize() {
|
||||
if (C->max_vector_size() > 0) {
|
||||
C->optimize_logic_cones(igvn);
|
||||
igvn.optimize();
|
||||
if (failing()) return;
|
||||
}
|
||||
|
||||
DEBUG_ONLY( _modified_nodes = nullptr; )
|
||||
@ -4366,6 +4372,7 @@ Compile::TracePhase::TracePhase(const char* name, elapsedTimer* accumulator)
|
||||
}
|
||||
|
||||
Compile::TracePhase::~TracePhase() {
|
||||
if (_compile->failing()) return;
|
||||
#ifdef ASSERT
|
||||
if (PrintIdealNodeCount) {
|
||||
tty->print_cr("phase name='%s' nodes='%d' live='%d' live_graph_walk='%d'",
|
||||
@ -5083,6 +5090,7 @@ void Compile::sort_macro_nodes() {
|
||||
}
|
||||
|
||||
void Compile::print_method(CompilerPhaseType cpt, int level, Node* n) {
|
||||
if (failing()) { return; }
|
||||
EventCompilerPhase event;
|
||||
if (event.should_commit()) {
|
||||
CompilerEvent::PhaseEvent::post(event, C->_latest_stage_start_counter, cpt, C->_compile_id, level);
|
||||
|
@ -3605,9 +3605,13 @@ bool IdealLoopTree::iteration_split_impl(PhaseIdealLoop *phase, Node_List &old_n
|
||||
// Non-counted loops may be peeled; exactly 1 iteration is peeled.
|
||||
// This removes loop-invariant tests (usually null checks).
|
||||
if (!_head->is_CountedLoop()) { // Non-counted loop
|
||||
if (PartialPeelLoop && phase->partial_peel(this, old_new)) {
|
||||
// Partial peel succeeded so terminate this round of loop opts
|
||||
return false;
|
||||
if (PartialPeelLoop) {
|
||||
bool rc = phase->partial_peel(this, old_new);
|
||||
if (Compile::current()->failing()) { return false; }
|
||||
if (rc) {
|
||||
// Partial peel succeeded so terminate this round of loop opts
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (policy_peeling(phase)) { // Should we peel?
|
||||
if (PrintOpto) { tty->print_cr("should_peel"); }
|
||||
|
@ -3685,6 +3685,7 @@ bool PhaseIdealLoop::partial_peel( IdealLoopTree *loop, Node_List &old_new ) {
|
||||
// and not a CMove (Matcher expects only bool->cmove).
|
||||
if (n->in(0) == nullptr && !n->is_Load() && !n->is_CMove()) {
|
||||
int new_clones = clone_for_use_outside_loop(loop, n, worklist);
|
||||
if (C->failing()) return false;
|
||||
if (new_clones == -1) {
|
||||
too_many_clones = true;
|
||||
break;
|
||||
|
@ -361,6 +361,7 @@ void Matcher::match( ) {
|
||||
C->set_cached_top_node(n);
|
||||
if (!C->failing()) {
|
||||
Node* xroot = xform( C->root(), 1 );
|
||||
if (C->failing()) return;
|
||||
if (xroot == nullptr) {
|
||||
Matcher::soft_match_failure(); // recursive matching process failed
|
||||
assert(false, "instruction match failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user