@@ -862,7 +862,7 @@ bool IdealLoopTree::policy_maximally_unroll(PhaseIdealLoop* phase) const {
862
862
863
863
uint trip_count = cl->trip_count ();
864
864
// Note, max_juint is used to indicate unknown trip count.
865
- assert (trip_count > 1 , " one iteration loop should be optimized out already" );
865
+ assert (trip_count > 1 , " one- iteration loop should be optimized out already" );
866
866
assert (trip_count < max_juint, " exact trip_count should be less than max_juint." );
867
867
868
868
// If nodes are depleted, some transform has miscalculated its needs.
@@ -1399,6 +1399,7 @@ void PhaseIdealLoop::insert_pre_post_loops(IdealLoopTree *loop, Node_List &old_n
1399
1399
CountedLoopNode *post_head = nullptr ;
1400
1400
Node* post_incr = incr;
1401
1401
Node* main_exit = insert_post_loop (loop, old_new, main_head, main_end, post_incr, limit, post_head);
1402
+ C->print_method (PHASE_AFTER_POST_LOOP, 4 , post_head);
1402
1403
1403
1404
// ------------------------------
1404
1405
// Step B: Create Pre-Loop.
@@ -1613,8 +1614,10 @@ void PhaseIdealLoop::insert_vector_post_loop(IdealLoopTree *loop, Node_List &old
1613
1614
Node *limit = main_end->limit ();
1614
1615
1615
1616
// In this case we throw away the result as we are not using it to connect anything else.
1617
+ C->print_method (PHASE_BEFORE_POST_LOOP, 4 , main_head);
1616
1618
CountedLoopNode *post_head = nullptr ;
1617
1619
insert_post_loop (loop, old_new, main_head, main_end, incr, limit, post_head);
1620
+ C->print_method (PHASE_AFTER_POST_LOOP, 4 , post_head);
1618
1621
1619
1622
// It's difficult to be precise about the trip-counts
1620
1623
// for post loops. They are usually very short,
@@ -3077,6 +3080,7 @@ bool IdealLoopTree::do_remove_empty_loop(PhaseIdealLoop *phase) {
3077
3080
return false ;
3078
3081
}
3079
3082
}
3083
+ phase->C ->print_method (PHASE_BEFORE_REMOVE_EMPTY_LOOP, 4 , cl);
3080
3084
if (cl->is_pre_loop ()) {
3081
3085
// If the loop we are removing is a pre-loop then the main and post loop
3082
3086
// can be removed as well.
@@ -3179,6 +3183,7 @@ bool IdealLoopTree::do_remove_empty_loop(PhaseIdealLoop *phase) {
3179
3183
phase->_igvn .replace_input_of (cl->loopexit (), CountedLoopEndNode::TestValue, zero);
3180
3184
3181
3185
phase->C ->set_major_progress ();
3186
+ phase->C ->print_method (PHASE_AFTER_REMOVE_EMPTY_LOOP, 4 , final_iv);
3182
3187
return true ;
3183
3188
}
3184
3189
@@ -3314,7 +3319,7 @@ void IdealLoopTree::collect_loop_core_nodes(PhaseIdealLoop* phase, Unique_Node_L
3314
3319
}
3315
3320
3316
3321
// ------------------------------do_one_iteration_loop--------------------------
3317
- // Convert one iteration loop into normal code.
3322
+ // Convert one- iteration loop into normal code.
3318
3323
bool IdealLoopTree::do_one_iteration_loop (PhaseIdealLoop *phase) {
3319
3324
if (!_head->as_Loop ()->is_valid_counted_loop (T_INT)) {
3320
3325
return false ; // Only for counted loop
@@ -3331,6 +3336,7 @@ bool IdealLoopTree::do_one_iteration_loop(PhaseIdealLoop *phase) {
3331
3336
}
3332
3337
#endif
3333
3338
3339
+ phase->C ->print_method (PHASE_BEFORE_ONE_ITERATION_LOOP, 4 , cl);
3334
3340
Node *init_n = cl->init_trip ();
3335
3341
// Loop boundaries should be constant since trip count is exact.
3336
3342
assert ((cl->stride_con () > 0 && init_n->get_int () + cl->stride_con () >= cl->limit ()->get_int ()) ||
@@ -3340,6 +3346,7 @@ bool IdealLoopTree::do_one_iteration_loop(PhaseIdealLoop *phase) {
3340
3346
// and all loop-invariant uses of the exit values will be correct.
3341
3347
phase->_igvn .replace_node (cl->phi (), cl->init_trip ());
3342
3348
phase->C ->set_major_progress ();
3349
+ phase->C ->print_method (PHASE_AFTER_ONE_ITERATION_LOOP, 4 , init_n);
3343
3350
return true ;
3344
3351
}
3345
3352
@@ -3354,7 +3361,7 @@ bool IdealLoopTree::iteration_split_impl(PhaseIdealLoop *phase, Node_List &old_n
3354
3361
// Compute loop trip count if possible.
3355
3362
compute_trip_count (phase);
3356
3363
3357
- // Convert one iteration loop into normal code.
3364
+ // Convert one- iteration loop into normal code.
3358
3365
if (do_one_iteration_loop (phase)) {
3359
3366
return true ;
3360
3367
}
0 commit comments