From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 1B53E3858431; Thu, 9 Dec 2021 12:48:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B53E3858431 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v7)] Use dump_printf_loc. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/loop-unswitch-improvement-v7 X-Git-Oldrev: cea3bbd3e26b5a5a443589f012227b5a2a9ec574 X-Git-Newrev: 890edf89dd940b3081b34f9bfee163402d27c875 Message-Id: <20211209124842.1B53E3858431@sourceware.org> Date: Thu, 9 Dec 2021 12:48:42 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2021 12:48:42 -0000 https://gcc.gnu.org/g:890edf89dd940b3081b34f9bfee163402d27c875 commit 890edf89dd940b3081b34f9bfee163402d27c875 Author: Martin Liska Date: Tue Dec 7 16:19:47 2021 +0100 Use dump_printf_loc. Diff: --- gcc/tree-ssa-loop-unswitch.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index 33fd7bad6d9..6e25eb703fe 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -820,9 +820,9 @@ tree_unswitch_single_loop (class loop *loop, int num, basic_block bb = NULL; if (num > param_max_unswitch_level) { - if (dump_file - && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, ";; Not unswitching anymore, hit max level\n"); + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc, + "Not unswitching anymore, hit max level\n"); goto exit; } @@ -849,13 +849,10 @@ tree_unswitch_single_loop (class loop *loop, int num, budget -= cost; break; } - else if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, ";; Not unswitching condition, cost too big " - "(%d insns): ", cost); - print_generic_expr (dump_file, pred->condition); - fprintf (dump_file, "\n"); - } + else if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc, + "Not unswitching condition, cost too big " + "(%d insns)\n", cost); } } @@ -864,12 +861,10 @@ tree_unswitch_single_loop (class loop *loop, int num, if (!dbg_cnt (loop_unswitch)) goto exit; - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, ";; Unswitching loop on condition: "); - print_generic_expr (dump_file, predicate->condition); - fprintf (dump_file, "\n"); - } + if (dump_enabled_p ()) + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, + "Unswitching loop on condition: %T\n", + predicate->condition); predicate->handled = true; initialize_original_copy_tables ();