From: Jakub Jelinek <jakub@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: Martin Sebor <msebor@gmail.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] avoid assuming gimple_call_alloc_size argument is a call (PR 99489)
Date: Fri, 12 Mar 2021 15:11:45 +0100 [thread overview]
Message-ID: <20210312141145.GX745611@tucnak> (raw)
In-Reply-To: <d1345b1e659264ed0de1464c89d0818b18bb942f.camel@redhat.com>
On Fri, Mar 12, 2021 at 09:04:33AM -0500, David Malcolm wrote:
> > from the start of the function and add is_gimple_call (stmt) &&
> > in tree-ssa-strlen.c.
>
> Maybe even make it convert it to taking a "const gcall *", so those
>
> if (is_gimple_call (stmt))
> {
> ...
> if (gimple_call_alloc_size (stmt, ...))
> {
> }
> }
>
> become:
>
> if (const gcall *call = dyn_cast <const gcall *> (stmt))
> {
> ...
> if (gimple_call_alloc_size (call, ...))
> {
> }
>
> }
I'm not a big fan of that, to me it means too much typing/clutter
and think that runtime checking we have is sufficient, but could live with
that.
Jakub
next prev parent reply other threads:[~2021-03-12 14:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 22:07 Martin Sebor
2021-03-12 13:52 ` Jakub Jelinek
2021-03-12 14:04 ` David Malcolm
2021-03-12 14:11 ` Jakub Jelinek [this message]
2021-03-13 21:31 ` Martin Sebor
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=20210312141145.GX745611@tucnak \
--to=jakub@redhat.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=msebor@gmail.com \
/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).