Re: [RFC] ipa bitwise constant propagation

2016-08-29 Thread Christophe Lyon
On 26 August 2016 at 19:22, Prathamesh Kulkarni wrote: > On 26 August 2016 at 21:53, Rainer Orth wrote: >> Hi Prathamesh, >> >>> The attached version passes bootstrap+test on >>> x86_64-unknown-linux-gnu, ppc64le-linux-gnu, >>> and

Re: [RFC] ipa bitwise constant propagation

2016-08-26 Thread Prathamesh Kulkarni
On 26 August 2016 at 21:53, Rainer Orth wrote: > Hi Prathamesh, > >> The attached version passes bootstrap+test on >> x86_64-unknown-linux-gnu, ppc64le-linux-gnu, >> and with c,c++,fortran on armv8l-linux-gnueabihf. >> Cross-tested on arm*-*-* and aarch64*-*-*. >>

Re: [RFC] ipa bitwise constant propagation

2016-08-26 Thread Rainer Orth
Hi Prathamesh, > The attached version passes bootstrap+test on > x86_64-unknown-linux-gnu, ppc64le-linux-gnu, > and with c,c++,fortran on armv8l-linux-gnueabihf. > Cross-tested on arm*-*-* and aarch64*-*-*. > Verified the patch survives lto-bootstrap on x86_64-unknown-linux-gnu. > Ok to commit ?

Re: [RFC] ipa bitwise constant propagation

2016-08-26 Thread Prathamesh Kulkarni
On 25 August 2016 at 19:14, Jan Hubicka wrote: >> Patch for performing interprocedural bitwise constant propagation. >> >> 2016-08-23 Prathamesh Kulkarni >> Martin Jambhor >> >> * common.opt: New option

Re: [RFC] ipa bitwise constant propagation

2016-08-25 Thread Jan Hubicka
> Patch for performing interprocedural bitwise constant propagation. > > 2016-08-23 Prathamesh Kulkarni > Martin Jambhor > > * common.opt: New option -fipa-cp-bit. > * doc/invoke.texi: Document -fipa-cp-bit. > *

Re: [RFC] ipa bitwise constant propagation

2016-08-24 Thread Prathamesh Kulkarni
On 22 August 2016 at 19:24, Prathamesh Kulkarni wrote: > On 22 August 2016 at 19:03, Martin Jambor wrote: >> Hi, >> >> On Tue, Aug 16, 2016 at 06:34:48PM +0530, Prathamesh Kulkarni wrote: >>> Thanks, I updated the patch to address these issues

Re: [RFC] ipa bitwise constant propagation

2016-08-22 Thread Prathamesh Kulkarni
On 22 August 2016 at 19:03, Martin Jambor wrote: > Hi, > > On Tue, Aug 16, 2016 at 06:34:48PM +0530, Prathamesh Kulkarni wrote: >> Thanks, I updated the patch to address these issues (attached). >> However the patch caused ICE during testing >> objc.dg/torture/forward-1.m (and

Re: [RFC] ipa bitwise constant propagation

2016-08-22 Thread Martin Jambor
Hi, On Tue, Aug 16, 2016 at 06:34:48PM +0530, Prathamesh Kulkarni wrote: > Thanks, I updated the patch to address these issues (attached). > However the patch caused ICE during testing > objc.dg/torture/forward-1.m (and few others but with same ICE): > > Command line options: >

Re: [RFC] ipa bitwise constant propagation

2016-08-16 Thread Prathamesh Kulkarni
On 12 August 2016 at 19:33, Jan Hubicka wrote: >> On 11 August 2016 at 18:25, Jan Hubicka wrote: >> >> @@ -266,6 +267,38 @@ private: >> >>bool meet_with_1 (unsigned new_align, unsigned new_misalign); >> >> }; >> >> >> >> +/* Lattice of known bits, only

Re: [RFC] ipa bitwise constant propagation

2016-08-12 Thread Jan Hubicka
> On 11 August 2016 at 18:25, Jan Hubicka wrote: > >> @@ -266,6 +267,38 @@ private: > >>bool meet_with_1 (unsigned new_align, unsigned new_misalign); > >> }; > >> > >> +/* Lattice of known bits, only capable of holding one value. > >> + Similar to ccp_lattice_t, mask

Re: [RFC] ipa bitwise constant propagation

2016-08-12 Thread Prathamesh Kulkarni
On 11 August 2016 at 18:25, Jan Hubicka wrote: >> @@ -266,6 +267,38 @@ private: >>bool meet_with_1 (unsigned new_align, unsigned new_misalign); >> }; >> >> +/* Lattice of known bits, only capable of holding one value. >> + Similar to ccp_lattice_t, mask represents which

Re: [RFC] ipa bitwise constant propagation

2016-08-11 Thread Jan Hubicka
> @@ -266,6 +267,38 @@ private: >bool meet_with_1 (unsigned new_align, unsigned new_misalign); > }; > > +/* Lattice of known bits, only capable of holding one value. > + Similar to ccp_lattice_t, mask represents which bits of value are > constant. > + If a bit in mask is set to 0, then

Re: [RFC] ipa bitwise constant propagation

2016-08-10 Thread Prathamesh Kulkarni
On 10 August 2016 at 14:14, Prathamesh Kulkarni wrote: > On 9 August 2016 at 23:43, Martin Jambor wrote: >> Hi, >> >> On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: >>> On 9 August 2016 at 16:39, Martin Jambor

Re: [RFC] ipa bitwise constant propagation

2016-08-10 Thread Prathamesh Kulkarni
On 9 August 2016 at 23:43, Martin Jambor wrote: > Hi, > > On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: >> On 9 August 2016 at 16:39, Martin Jambor wrote: >> >> ... >> >> >> Instead of storing arg's precision and sign, we should store >>

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Martin Jambor
Hi, On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: > On 9 August 2016 at 16:39, Martin Jambor wrote: > > ... > > >> Instead of storing arg's precision and sign, we should store > >> parameter's precision and sign in ipa_compute_jump_functions_for_edge (). >

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Prathamesh Kulkarni
On 9 August 2016 at 16:39, Martin Jambor wrote: > Hi, > > On Tue, Aug 09, 2016 at 01:41:21PM +0530, Prathamesh Kulkarni wrote: >> On 8 August 2016 at 19:33, Martin Jambor wrote: >> >> >> +class ipcp_bits_lattice >> >> >> +{ >> >> >> +public: >> >> >> + bool

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Martin Jambor
Hi, On Tue, Aug 09, 2016 at 01:41:21PM +0530, Prathamesh Kulkarni wrote: > On 8 August 2016 at 19:33, Martin Jambor wrote: > >> >> +class ipcp_bits_lattice > >> >> +{ > >> >> +public: > >> >> + bool bottom_p () { return lattice_val == IPA_BITS_VARYING; } > >> >> + bool top_p

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Richard Biener
On Tue, 9 Aug 2016, Prathamesh Kulkarni wrote: > On 8 August 2016 at 19:33, Martin Jambor wrote: > > Hi, > > > > thanks for following through. You'll need an approval from Honza, but > > I think the code looks good (I have looked at the places that I > > believe have changed

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Prathamesh Kulkarni
On 8 August 2016 at 19:33, Martin Jambor wrote: > Hi, > > thanks for following through. You'll need an approval from Honza, but > I think the code looks good (I have looked at the places that I > believe have changed since the last week). However, I have discovered > one new

Re: [RFC] ipa bitwise constant propagation

2016-08-08 Thread David Malcolm
On Mon, 2016-08-08 at 16:03 +0200, Martin Jambor wrote: > Hi, > > thanks for following through. You'll need an approval from Honza, > but > I think the code looks good (I have looked at the places that I > believe have changed since the last week). However, I have > discovered > one new thing I

Re: [RFC] ipa bitwise constant propagation

2016-08-08 Thread Martin Jambor
Hi, thanks for following through. You'll need an approval from Honza, but I think the code looks good (I have looked at the places that I believe have changed since the last week). However, I have discovered one new thing I don't like and still believe you need to handle different precisions in

Re: [RFC] ipa bitwise constant propagation

2016-08-07 Thread Prathamesh Kulkarni
On 5 August 2016 at 18:06, Martin Jambor wrote: > Hi, Hi Martin, Thanks for the review. Please find my responses inline. > > generally speaking, the ipa-cp.c and ipa-cp.[hc] bits look reasonable, > but I have a few comments: > > On Thu, Aug 04, 2016 at 12:06:18PM +0530,

Re: [RFC] ipa bitwise constant propagation

2016-08-05 Thread Martin Jambor
Hi, generally speaking, the ipa-cp.c and ipa-cp.[hc] bits look reasonable, but I have a few comments: On Thu, Aug 04, 2016 at 12:06:18PM +0530, Prathamesh Kulkarni wrote: > Hi, > This is a prototype patch for propagating known/unknown bits > inter-procedurally. > for integral types which

Re: [RFC] ipa bitwise constant propagation

2016-08-05 Thread Jan Hubicka
> Hi Honza, > > On 04/08/16 23:05, Jan Hubicka wrote: > >>I didn't look at the propagation part but eventually the IPA-CP > >>lattice gets quite big. Also the alignment lattice is very > >>similar to the bits lattice so why not merge those two? But > > > >This was always the original idea to

Re: [RFC] ipa bitwise constant propagation

2016-08-04 Thread kugan
Hi Honza, On 04/08/16 23:05, Jan Hubicka wrote: I didn't look at the propagation part but eventually the IPA-CP lattice gets quite big. Also the alignment lattice is very similar to the bits lattice so why not merge those two? But This was always the original idea to replace alignment

Re: [RFC] ipa bitwise constant propagation

2016-08-04 Thread Jan Hubicka
> I didn't look at the propagation part but eventually the IPA-CP > lattice gets quite big. Also the alignment lattice is very > similar to the bits lattice so why not merge those two? But This was always the original idea to replace alignment propagation by bitwise ccp. I suppose we only have

Re: [RFC] ipa bitwise constant propagation

2016-08-04 Thread Richard Biener
On Thu, 4 Aug 2016, Prathamesh Kulkarni wrote: > On 4 August 2016 at 13:31, Richard Biener wrote: > > On Thu, 4 Aug 2016, Prathamesh Kulkarni wrote: > > > >> Hi, > >> This is a prototype patch for propagating known/unknown bits > >> inter-procedurally. > >> for integral types

Re: [RFC] ipa bitwise constant propagation

2016-08-04 Thread kugan
On 04/08/16 18:57, Prathamesh Kulkarni wrote: On 4 August 2016 at 13:31, Richard Biener wrote: On Thu, 4 Aug 2016, Prathamesh Kulkarni wrote: Hi, This is a prototype patch for propagating known/unknown bits inter-procedurally. for integral types which propagates info

Re: [RFC] ipa bitwise constant propagation

2016-08-04 Thread Prathamesh Kulkarni
On 4 August 2016 at 13:31, Richard Biener wrote: > On Thu, 4 Aug 2016, Prathamesh Kulkarni wrote: > >> Hi, >> This is a prototype patch for propagating known/unknown bits >> inter-procedurally. >> for integral types which propagates info obtained from get_nonzero_bits (). >>

Re: [RFC] ipa bitwise constant propagation

2016-08-04 Thread Richard Biener
On Thu, 4 Aug 2016, Prathamesh Kulkarni wrote: > Hi, > This is a prototype patch for propagating known/unknown bits > inter-procedurally. > for integral types which propagates info obtained from get_nonzero_bits (). > > Patch required making following changes: > a) To make info from

[RFC] ipa bitwise constant propagation

2016-08-04 Thread Prathamesh Kulkarni
Hi, This is a prototype patch for propagating known/unknown bits inter-procedurally. for integral types which propagates info obtained from get_nonzero_bits (). Patch required making following changes: a) To make info from get_nonzero_bits() available to ipa, I had to remove guard !nonzero_p in