From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id AA8B83839064 for ; Tue, 30 Aug 2022 13:37:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AA8B83839064 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id CE2D71F90B for ; Tue, 30 Aug 2022 13:37:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1661866660; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=zGv71a0s3vbc5kT+Z3PL7ZJOqiZ+x7F5/nPmp3qSIzM=; b=Ew8Ni9IOpygBH40iyG+PMSISpqPrU3K1mtorR25YlPiZuNvXQq09keMYla2HzR0meXLHpZ RwvS8yzWWmhoS9ifHUQJPjvpgJ4Td/oypzCDWq9x1rxf4ZQCeTTDMjNsX0piYS/inXgVis QjOO7Wmo7R2pVPBsPCEnb6yAzJfVqpM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1661866660; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=zGv71a0s3vbc5kT+Z3PL7ZJOqiZ+x7F5/nPmp3qSIzM=; b=SEcdS7/y0w5ERLAXjeG4Otc4JKuaDMSSayQNnZVFh46+PmTtr/V+wpjK+KaAWAJxYx3xsq RaXAMHn6nHlZcnBg== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C99EF2C141 for ; Tue, 30 Aug 2022 13:37:40 +0000 (UTC) Date: Tue, 30 Aug 2022 13:37:40 +0000 (UTC) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Improve uninit pass dumping User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,MISSING_MID,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Message-ID: <20220830133740.-1srx8psTiX0f9LXZSy8b6lZLnqYTWEAHyGQ_qJ-ITY@z> This produces less redundancy and more complete info dumping the control dependence chains. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * gimple-predicate-analysis.cc (format_edge_vec): Dump both source and destination. (dump_dep_chains): Remove. (uninit_analysis::init_use_preds): Remove redundant dumping of chains. --- gcc/gimple-predicate-analysis.cc | 34 ++++---------------------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/gcc/gimple-predicate-analysis.cc b/gcc/gimple-predicate-analysis.cc index 62a13c39d7a..f9ae8910a26 100644 --- a/gcc/gimple-predicate-analysis.cc +++ b/gcc/gimple-predicate-analysis.cc @@ -122,10 +122,10 @@ format_edge_vec (const vec &ev) { char es[32]; const_edge e = ev[i]; - sprintf (es, "%u", e->src->index); + sprintf (es, "%u -> %u", e->src->index, e->dest->index); str += es; if (i + 1 < n) - str += " -> "; + str += ", "; } return str; } @@ -180,28 +180,6 @@ dump_pred_chain (const pred_chain &chain) } } -/* Dump the first NCHAINS elements of the DEP_CHAINS array into DUMP_FILE. */ - -static void -dump_dep_chains (const auto_vec dep_chains[], unsigned nchains) -{ - if (!dump_file) - return; - - for (unsigned i = 0; i != nchains; ++i) - { - const auto_vec &v = dep_chains[i]; - unsigned n = v.length (); - for (unsigned j = 0; j != n; ++j) - { - fprintf (dump_file, "%u", v[j]->src->index); - if (j + 1 < n) - fprintf (dump_file, " -> "); - } - fputc ('\n', dump_file); - } -} - /* Return the 'normalized' conditional code with operand swapping and condition inversion controlled by SWAP_COND and INVERT. */ @@ -1922,12 +1900,8 @@ uninit_analysis::init_use_preds (predicate &use_preds, basic_block def_bb, } if (DEBUG_PREDICATE_ANALYZER && dump_file) - { - fprintf (dump_file, "predicate::predicate (def_bb = %u, use_bb = %u, func_t) " - "initialized from %u dep_chains:\n\t", - def_bb->index, use_bb->index, num_chains); - dump_dep_chains (dep_chains, num_chains); - } + fprintf (dump_file, "init_use_preds (def_bb = %u, use_bb = %u)\n", + def_bb->index, use_bb->index); /* From the set of edges computed above initialize *THIS as the OR condition under which the definition in DEF_BB is used in USE_BB. -- 2.35.3