From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH][RFC] Unify MAX_NUM_CHAINS and MAX_CHAIN_LEN to --param uninit-max-predicate-size
Date: Tue, 22 Nov 2022 17:37:21 -0700 [thread overview]
Message-ID: <25d9b95d-06c0-adf0-01cf-2156523b819b@gmail.com> (raw)
In-Reply-To: <20220905132513.C7928139C7@imap2.suse-dmz.suse.de>
On 9/5/22 07:25, Richard Biener via Gcc-patches wrote:
> The following exposes the MAX_NUM_CHAINS and MAX_CHAIN_LEN to the user
> by adding a --param uninit-max-predicate-size and re-doing the
> limits on the whole predicate expression size rather than limiting
> the number of OR and AND elements separately. The following goes
> a step further and for a single AND chain allows an arbitrary size,
> limiting that only with the computational --param
> uninit-control-dep-attempts parameter. That might be a bit high
> in practice, but it seems odd to continue searching for smaller and
> smaller paths until we exhaust the search space or
> uninit-control-dep-attempts.
>
> I'm testing this on x86_64-unknown-linux-gnu at the moment.
>
> Any comments?
>
> Thanks,
> Richard.
>
> * params.opt (uninit-max-predicate-size): New.
> * doc/invoke.texi (--param uninit-max-predicate-size): Document.
> * gimple-predicate-analysis.h
> (predicate::init_from_control_deps): Adjust.
> * gimple-predicate-analysis.cc (MAX_NUM_CHAINS, MAX_CHAIN_LEN):
> Remove.
> (format_edge_vecs): Adjust.
> (simple_control_dep_chain): Do not limit.
> (compute_control_dep_chain): Adjust limiting to the overall
> predicate expression size _after_ adding an element to the
> vector of AND chains.
> (predicate::init_from_control_deps): Adjust.
> (uninit_analysis::init_use_preds): Likewise.
> (uninit_analysis::init_from_phi_def): Likewise.
I think we probably have too many knobs already, though magic numbers
are even worse. I suspect we (gcc develoeprs) will be the biggest user
of this if we go forward. Essentially given a testcase we can crank up
the limits to see if the test is hitting limits or exposing a deeper
problem.
So based on removal of the magic #s, it looks good to me.
jeff
prev parent reply other threads:[~2022-11-23 0:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 13:25 Richard Biener
2022-11-23 0:37 ` Jeff Law [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25d9b95d-06c0-adf0-01cf-2156523b819b@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).