From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id AA16739960CD; Tue, 30 Aug 2022 13:38:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA16739960CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661866729; bh=szu0KwIj+SaYdcQPqVJQJ/zIlult8EjNU/yqLBAvZ0E=; h=From:To:Subject:Date:From; b=BfANkuyGyeT5TjXwYeC+MFpRfWsTyj2zSMDs4Z86ueTI3O3PcZYTfwByXvAdoWatN wcL9NRGfFXQ+Pusoy4bEx2sAUYh44IuCG05TwEc8GXcP5cVtuDFsljy5BdhzlJYutT wz1mbSGt0tbHqbhxIwYfRufBu7N/Fp/N95ihA2eM= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2278] Improve uninit pass dumping X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: fe915f35b7d8dc768a2b977c09aa02f933e1d1e9 X-Git-Newrev: 28b5311203fa2a691a1ed980ffa6d5ff607485b1 Message-Id: <20220830133849.AA16739960CD@sourceware.org> Date: Tue, 30 Aug 2022 13:38:49 +0000 (GMT) List-Id: https://gcc.gnu.org/g:28b5311203fa2a691a1ed980ffa6d5ff607485b1 commit r13-2278-g28b5311203fa2a691a1ed980ffa6d5ff607485b1 Author: Richard Biener Date: Tue Aug 30 14:36:39 2022 +0200 Improve uninit pass dumping This produces less redundancy and more complete info dumping the control dependence chains. * 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. Diff: --- 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 f8c63d24537..068196cb157 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. */ @@ -1940,12 +1918,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.