From: Richard Biener <richard.guenther@gmail.com>
To: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>,
Jan Hubicka <hubicka@ucw.cz>, Martin Jambor <mjambor@suse.cz>,
Richard Biener <rguenther@suse.de>
Subject: Re: [RFC] Extend ipa-bitwise-cp with pointer alignment propagation
Date: Thu, 22 Sep 2016 09:38:00 -0000 [thread overview]
Message-ID: <CAFiYyc3-oHjWQuZdVuP6+YWoMfS1Zk=W=jPxyzEUrJBC7Zaq_g@mail.gmail.com> (raw)
In-Reply-To: <CAAgBjMkR_Am6Zn26zx+Ah7AHZjhKe8J+156VWxZG74C+QZFADw@mail.gmail.com>
On Wed, Sep 21, 2016 at 6:44 PM, Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> wrote:
> Hi,
> The attached patch tries to extend ipa bits propagation to handle
> pointer alignment propagation.
> The patch just disables ipa-cp-alignment pass, I suppose we want to
> eventually remove it ?
>
> Bootstrap+tested on x86_64-unknown-linux-gnu.
> Cross-tested on arm*-*-*, aarch64*-*-*.
> Does the patch look OK ?
Just looking at the alignment extraction:
+ else
if (POINTER_TYPE_P (...))
+ {
+ unsigned tem = bits[i].mask.to_uhwi ();
+ unsigned HOST_WIDE_INT bitpos = bits[i].value.to_uhwi ();
+ unsigned align = tem & -tem;
+ unsigned misalign = bitpos & (align - 1);
...
+ if (old_known
+ && old_align > align)
+ {
+ if (dump_file)
+ fprintf (dump_file, "But alignment was already %u.\n",
old_align);
+ continue;
+ }
it would be nice to sanity check old misalign against misalign.
Basically
gcc_assert (misalign & (old_align - 1) == old_misalign)
here (and in the old_align > align case the reverse).
+ set_ptr_info_alignment (pi, align, misalign);
- ret |= propagate_alignment_accross_jump_function (cs, jump_func,
-
&dest_plats->alignment);
+// ret |= propagate_alignment_accross_jump_function (cs, jump_func,
+//
this should of course be removed rather than commented.
Leaving the IPA parts to somebody else.
Richard.
> Thanks,
> Prathamesh
next prev parent reply other threads:[~2016-09-22 9:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 17:25 Prathamesh Kulkarni
2016-09-22 9:38 ` Richard Biener [this message]
2016-09-22 9:41 ` Richard Biener
2016-09-22 12:12 ` Jan Hubicka
2016-10-03 19:07 ` Prathamesh Kulkarni
2016-10-04 14:54 ` Jan Hubicka
2016-10-05 14:16 ` Martin Jambor
2016-10-06 4:55 ` Prathamesh Kulkarni
2016-10-06 13:21 ` Jan Hubicka
2016-10-06 20:55 ` Prathamesh Kulkarni
2016-10-08 17:31 ` Jan Hubicka
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='CAFiYyc3-oHjWQuZdVuP6+YWoMfS1Zk=W=jPxyzEUrJBC7Zaq_g@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=mjambor@suse.cz \
--cc=prathamesh.kulkarni@linaro.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).