On Wed, Sep 21, 2016 at 6:44 PM, Prathamesh Kulkarni
> 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:
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",
it would be nice to sanity check old misalign against misalign.
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,
+// 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.