From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: gcc-patches@gcc.gnu.org
Cc: jakub@redhat.com
Subject: Re: [PATCH] tree-optimization/108522 Use component_ref_field_offset
Date: Tue, 7 Feb 2023 15:03:55 -0500 [thread overview]
Message-ID: <fee7fa8b-a392-7973-d094-21641be712d0@gotplt.org> (raw)
In-Reply-To: <20230126033210.1926726-1-siddhesh@gotplt.org>
On 2023-01-25 22:32, Siddhesh Poyarekar wrote:
> Instead of using TREE_OPERAND (expr, 2) directly, use
> component_ref_field_offset instead, which does scaling for us. The
> function also substitutes PLACEHOLDER_EXPRs, which is probably what we
> want anyway but I'm not sure if it's relevant for tree-object-size.
>
> gcc/ChangeLog:
>
> PR tree-optimization/108522
> * tree-object-size.cc (compute_object_offset): Make EXPR
> argument non-const. Call component_ref_field_offset.
>
> gcc/testsuite/ChangeLog:
>
> PR tree-optimization/108522
> * gcc.dg/builtin-dynamic-object-size-0.c (DEFSTRUCT): New
> macro.
> (test_dynarray_struct_member_b, test_dynarray_struct_member_c,
> test_dynarray_struct_member_d,
> test_dynarray_struct_member_subobj_b,
> test_dynarray_struct_member_subobj_c,
> test_dynarray_struct_member_subobj_d): New tests.
> (main): Call them.
>
> Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
... and now pushed (this and the earlier commit) to gcc-12 branch.
Sid
prev parent reply other threads:[~2023-02-07 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 3:32 Siddhesh Poyarekar
2023-01-26 7:15 ` Richard Biener
2023-01-27 11:05 ` Eric Botcazou
2023-01-27 11:49 ` Richard Biener
2023-02-07 20:03 ` Siddhesh Poyarekar [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=fee7fa8b-a392-7973-d094-21641be712d0@gotplt.org \
--to=siddhesh@gotplt.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.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).