From: Andrew MacLeod <amacleod@redhat.com>
To: Aldy Hernandez <aldyh@redhat.com>, GCC patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Avoid calling tracer.trailer() twice.
Date: Tue, 11 Oct 2022 09:11:40 -0400 [thread overview]
Message-ID: <a0f7b90e-5805-98a5-107a-af8e45d08e0f@redhat.com> (raw)
In-Reply-To: <20221010185829.312666-1-aldyh@redhat.com>
It probably should just be changed to a print if it doesn't return..
something like
if (idx && res)
{
tracer.print (idx, "logical_combine produced");
r.dump (dump_file);
fputc ('\n', dump_file);
}
Andrew
On 10/10/22 14:58, Aldy Hernandez wrote:
> [Andrew, you OK with this? I can't tell whether the trailer() call was
> actually needed.]
>
> logical_combine is calling tracer.trailer() one too many times causing
> the second trailer() call to subtract a 0 indent by 2, yielding an
> indent of SOMETHING_REALLY_BIG :). You'd be surprised how many tools
> can't handle incredibly long lines.
>
> gcc/ChangeLog:
>
> * gimple-range-gori.cc (gori_compute::logical_combine): Avoid
> calling tracer.trailer().
> ---
> gcc/gimple-range-gori.cc | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc
> index b37d03cddda..469382aa477 100644
> --- a/gcc/gimple-range-gori.cc
> +++ b/gcc/gimple-range-gori.cc
> @@ -798,20 +798,12 @@ gori_compute::logical_combine (vrange &r, enum tree_code code,
> // would be lost.
> if (!range_is_either_true_or_false (lhs))
> {
> - bool res;
> Value_Range r1 (r);
> if (logical_combine (r1, code, m_bool_zero, op1_true, op1_false,
> op2_true, op2_false)
> && logical_combine (r, code, m_bool_one, op1_true, op1_false,
> op2_true, op2_false))
> - {
> - r.union_ (r1);
> - res = true;
> - }
> - else
> - res = false;
> - if (idx)
> - tracer.trailer (idx, "logical_combine", res, NULL_TREE, r);
> + r.union_ (r1);
> }
>
> switch (code)
next prev parent reply other threads:[~2022-10-11 13:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 18:58 Aldy Hernandez
2022-10-11 13:11 ` Andrew MacLeod [this message]
2022-10-11 14:08 ` Aldy Hernandez
2022-10-11 14:47 ` Andrew MacLeod
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=a0f7b90e-5805-98a5-107a-af8e45d08e0f@redhat.com \
--to=amacleod@redhat.com \
--cc=aldyh@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).