Re: PR35503 - warn for restrict pointer

2016-08-30 Thread Prathamesh Kulkarni
On 30 August 2016 at 05:34, David Malcolm wrote: > On Mon, 2016-08-29 at 20:01 -0400, David Malcolm wrote: >> On Mon, 2016-08-29 at 19:55 -0400, David Malcolm wrote: >> [...] >> > Assuming you have the location_t values available, you can create a >> > rich_location for the

Re: PR35503 - warn for restrict pointer

2016-08-29 Thread Prathamesh Kulkarni
On 29 August 2016 at 19:59, Marek Polacek <pola...@redhat.com> wrote: > On Mon, Aug 29, 2016 at 04:25:25PM +0200, Tobias Burnus wrote: >> Prathamesh Kulkarni wrote: >> > Attachment: pr35503-3.txt >> >> I tried the patch - and it found a bug in our code; nice!

Re: PR35503 - warn for restrict pointer

2016-08-28 Thread Prathamesh Kulkarni
On 26 August 2016 at 21:25, Jason Merrill <ja...@redhat.com> wrote: > On Fri, Aug 26, 2016 at 7:39 AM, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> However with C++FE it appears TYPE_RESTRICT is not set for the >> parameters (buf and fmt) >&g

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 Prathamesh Kulkarni
On 25 August 2016 at 19:14, Jan Hubicka <hubi...@ucw.cz> wrote: >> Patch for performing interprocedural bitwise constant propagation. >> >> 2016-08-23 Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> >> Martin Jambhor <mjam...@suse.cz> >

PR35503 - warn for restrict pointer

2016-08-26 Thread Prathamesh Kulkarni
Hi, The following patch adds option -Wrestrict that warns when an argument is passed to a restrict qualified parameter and it aliases with another argument. eg: int foo (const char *__restrict buf, const char *__restrict fmt, ...); void f(void) { char buf[100] = "hello"; foo (buf, "%s-%s",

Re: [RFC] ipa bitwise constant propagation

2016-08-24 Thread Prathamesh Kulkarni
On 22 August 2016 at 19:24, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 22 August 2016 at 19:03, Martin Jambor <mjam...@suse.cz> wrote: >> Hi, >> >> On Tue, Aug 16, 2016 at 06:34:48PM +0530, Prathamesh Kulkarni wrote: >>> Thanks, I

Re: [RFC] ipa bitwise constant propagation

2016-08-22 Thread Prathamesh Kulkarni
On 22 August 2016 at 19:03, Martin Jambor <mjam...@suse.cz> 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 >

Re: [libcpp] append "evaluates to 0" for Wundef diagnostic

2016-08-19 Thread Prathamesh Kulkarni
On 19 August 2016 at 18:29, David Malcolm <dmalc...@redhat.com> wrote: > On Fri, 2016-08-19 at 14:15 +0530, Prathamesh Kulkarni wrote: >> Hi David, >> This trivial patch appends "evaluates to 0", in Wundef diagnostic, >> similar to clang, which prints t

[libcpp] append "evaluates to 0" for Wundef diagnostic

2016-08-19 Thread Prathamesh Kulkarni
to commit ? Thanks, Prathamesh 2016-08-19 Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> libcpp/ * expr.c (eval_token): Append "evaluates to 0" to Wundef diagnostic. testsuite/ * gcc.dg/cpp/warn-undef.c: Append "evaluates to 0" to dg-error.

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 [1/2] divmod transform

2016-08-13 Thread Prathamesh Kulkarni
On 13 August 2016 at 16:56, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 28 July 2016 at 19:05, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> On 8 June 2016 at 19:53, Richard Biener <rguent...@suse.de> wrote: >>&g

Re: RFC [1/2] divmod transform

2016-08-13 Thread Prathamesh Kulkarni
On 28 July 2016 at 19:05, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 8 June 2016 at 19:53, Richard Biener <rguent...@suse.de> wrote: >> On Fri, 3 Jun 2016, Jim Wilson wrote: >> >>> On Mon, May 30, 2016 at 12:45 AM, Richard Biener <rgue

Re: divmod transform: add test-cases

2016-08-12 Thread Prathamesh Kulkarni
On 12 August 2016 at 12:47, Richard Biener <rguent...@suse.de> wrote: > On Thu, 11 Aug 2016, Jeff Law wrote: > >> On 08/09/2016 04:58 AM, Prathamesh Kulkarni wrote: >> > ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01869.html >> This seems to be dependent u

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: [PATCH] RFC: -fasm-show-source

2016-08-11 Thread Prathamesh Kulkarni
On 12 August 2016 at 02:04, David Malcolm wrote: > I sometimes find myself scouring assembler output from the compiler > and trying to figure out which instructions correspond to which > lines of source code; I believe this is a common activity for some > end-users. Hi David,

Re: fold strlen (s) eq/ne 0 to *s eq/ne 0 on GIMPLE

2016-08-11 Thread Prathamesh Kulkarni
On 1 August 2016 at 17:03, Richard Biener <rguent...@suse.de> wrote: > On Mon, 1 Aug 2016, Prathamesh Kulkarni wrote: > >> Hi Richard, >> The attached patch tries to fold strlen (s) eq/ne 0 to *s eq/ne 0 on GIMPLE. >> I am not sure where was the ideal place to put

Re: [RFC] ipa bitwise constant propagation

2016-08-10 Thread Prathamesh Kulkarni
On 10 August 2016 at 14:14, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 9 August 2016 at 23:43, Martin Jambor <mjam...@suse.cz> wrote: >> Hi, >> >> On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: >>> On 9

Re: [RFC] ipa bitwise constant propagation

2016-08-10 Thread Prathamesh Kulkarni
On 9 August 2016 at 23:43, Martin Jambor <mjam...@suse.cz> wrote: > Hi, > > On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: >> On 9 August 2016 at 16:39, Martin Jambor <mjam...@suse.cz> wrote: >> >> ... >> >> >> Ins

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Prathamesh Kulkarni
On 9 August 2016 at 16:39, Martin Jambor <mjam...@suse.cz> wrote: > Hi, > > On Tue, Aug 09, 2016 at 01:41:21PM +0530, Prathamesh Kulkarni wrote: >> On 8 August 2016 at 19:33, Martin Jambor <mjam...@suse.cz> wrote: >> >> >> +class ipcp_bits_lattice &

Re: divmod transform: add test-cases

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01869.html Thanks, Prathamesh On 28 July 2016 at 19:07, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > Hi, > The following patch adds test-cases for divmod transform. > I separated the SImode tests into separate f

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01969.html Thanks, Prathamesh On 29 July 2016 at 22:13, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 29 July 2016 at 05:40, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> On 28 Ju

Re: RFC [1/2] divmod transform

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01867.html Thanks, Prathamesh On 28 July 2016 at 19:05, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 8 June 2016 at 19:53, Richard Biener <rguent...@suse.de> wrote: >> On Fri, 3 Jun 2016, Jim Wilson wrot

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Prathamesh Kulkarni
discovered > one new thing I don't like and still believe you need to handle > different precisions in lattice need: > > On Mon, Aug 08, 2016 at 03:08:35AM +0530, Prathamesh Kulkarni wrote: >> On 5 August 2016 at 18:06, Martin Jambor <mjam...@suse.cz> wrote: >> >&

[RFC] [ipa bitwise cp] tree-ssa-ccp changes

2016-08-07 Thread Prathamesh Kulkarni
Hi Richard, In the attached version, I tried to address your suggestions from: https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00279.html In ccp_finalize we do: wide_int nonzero_bits = wide_int::from (val->mask, precision, UNSIGNED) | val->value;

Re: [RFC] ipa bitwise constant propagation

2016-08-07 Thread Prathamesh Kulkarni
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 propagates info obtained from get_nonzero_bits (). >> >> Patch required making following changes:

Re: [tree-ssa-ccp] modify extend_mask to extend bits based on signop

2016-08-06 Thread Prathamesh Kulkarni
On 5 August 2016 at 13:52, Richard Biener <rguent...@suse.de> wrote: > On Fri, 5 Aug 2016, Prathamesh Kulkarni wrote: > >> Ah, the mail failed to be delivered to gcc-patches, sorry for the >> double-post. >> On 5 August 2016 at 01:26, Prathamesh Kulkarni >> &l

[testsuite] add require-effective-target c99_runtime for pr71078-*.c tests

2016-08-06 Thread Prathamesh Kulkarni
Hi Richard, The patch for PR71078 broke the test-cases for arm and aarch64 bare metal targets :/ In the attached patch, restricting the tests to c99_runtime. Sorry for the breakage. Ok for trunk ? Thanks, Prathamesh 2016-08-06 Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> tes

Re: [Committed] [PATCH 2/4] (v4) On-demand locations within string-literals

2016-08-05 Thread Prathamesh Kulkarni
On 6 August 2016 at 11:16, Markus Trippelsdorf wrote: > On 2016.08.05 at 14:16 -0400, David Malcolm wrote: >> Successfully bootstrapped the updated patch on x86_64-pc >> -linux-gnu, and successfully ran the stage 1 selftests on powerpc-ibm >> -aix7.1.3.0 (gcc111) >> >>

make streaming routines for widest_int non-static

2016-08-04 Thread Prathamesh Kulkarni
Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> * lto-streamer-in.c (streamer_read_wi): Make function non-static. * lto-streamer-out.c (streamer_write_wi): Likewise. * lto-streamer.h: Export streamer_read_wi and streamer_write_wi. diff --git a/gcc/lto-streamer-

Re: [tree-ssa-ccp] modify extend_mask to extend bits based on signop

2016-08-04 Thread Prathamesh Kulkarni
Ah, the mail failed to be delivered to gcc-patches, sorry for the double-post. On 5 August 2016 at 01:26, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > Hi, > Is the attached patch OK ? > Since we want to extend based on signop, I removed ORing with wi::mask(). &

Re: fix fallout of pr22051-2.c on arm

2016-08-04 Thread Prathamesh Kulkarni
On 4 August 2016 at 12:39, Richard Biener <rguent...@suse.de> wrote: > On Thu, 4 Aug 2016, Prathamesh Kulkarni wrote: > >> Hi, >> The attached patch fixes pr22051-2.c which regressed due to >> r238754. Matthew, could you please confirm if this patch

split test cases pr71078-1.c and pr71078-2.c

2016-08-04 Thread Prathamesh Kulkarni
Hi, The attached patch splits each test-case into three, one for float, double and long-double. I verified that the long double tests are unsupported now for arm target. OK to commit ? Thanks, Prathamesh 2016-08-04 Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> tes

Re: [RFC] ipa bitwise constant propagation

2016-08-04 Thread Prathamesh Kulkarni
On 4 August 2016 at 13:31, Richard Biener <rguent...@suse.de> 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

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-08-04 Thread Prathamesh Kulkarni
On 4 August 2016 at 12:39, Richard Biener <rguent...@suse.de> wrote: > On Thu, 4 Aug 2016, Prathamesh Kulkarni wrote: > >> On 3 August 2016 at 17:27, Matthew Wahab <matthew.wa...@foss.arm.com> wrote: >> > On 29/07/16 15:32, Prathamesh Kulkarni wrote: >> >

[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

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-08-03 Thread Prathamesh Kulkarni
On 3 August 2016 at 17:27, Matthew Wahab <matthew.wa...@foss.arm.com> wrote: > On 29/07/16 15:32, Prathamesh Kulkarni wrote: >> >> On 29 July 2016 at 12:42, Richard Biener <rguent...@suse.de> wrote: >>> >>> On Fri, 29 Jul 2016, Prathamesh Kulkarni wrot

fix fallout of pr22051-2.c on arm

2016-08-03 Thread Prathamesh Kulkarni
Hi, The attached patch fixes pr22051-2.c which regressed due to r238754. Matthew, could you please confirm if this patch fixes the test-case for you ? Bootstrapped and tested on x86_64-unknown-linux-gnu. Cross tested on arm*-*-*. OK for trunk ? Thanks, Prathamesh 2016-08-04 Prathamesh Kulkarni

[PR57371] transform (double)i eq/ne 0 to i eq/ne 0

2016-08-03 Thread Prathamesh Kulkarni
Hi, The attached patch tries to transform (double)i eq/ne 0 to i eq/ne 0 AFAIU from Joseph's comment 1 in PR, the transform should be safe with -fno-trapping-math ? Bootstrap+tested on x86_64-unknown-linux-gnu in progress. Thanks, Prathamesh 2016-08-03 Prathamesh Kulkarni <prathamesh.ku

fold strlen (s) eq/ne 0 to *s eq/ne 0 on GIMPLE

2016-08-01 Thread Prathamesh Kulkarni
the following assert in execute_todo(): if (flag_checking && cfun && need_ssa_update_p (cfun)) gcc_assert (flags & TODO_update_ssa_any); Bootstrap+test in progress on x86_64-unknown-linux-gnu. Thanks, Prathamesh 2016-08-01 Prathamesh Kulkarni <pratham

Re: [PR71078] x / abs(x) -> copysign (1.0, x)

2016-08-01 Thread Prathamesh Kulkarni
athamesh > > -- > Joseph S. Myers > jos...@codesourcery.com 2016-08-01 Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> * match.pd (x/abs(x) -> copysign(1.0, x)): Don't transform for long double. testsuite/ * gcc.dg/tree-ssa/pr71078-1.c: Remove f3. * gcc.d

Re: [RFC] warn on dead function calls in ipa-pure-const [1/4]

2016-07-31 Thread Prathamesh Kulkarni
On 31 July 2016 at 22:01, Jan Hubicka <hubi...@ucw.cz> wrote: >> On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: >> >> > + warning_at (gimple_location (g), OPT_Wunused_value, >> > + "Call from %s to %s has no effect", >> &

Re: [PATCH] Replacing gcc's dependence on libiberty's fnmatch to gnulib's fnmatch

2016-07-29 Thread Prathamesh Kulkarni
On 30 July 2016 at 03:40, Joseph Myers <jos...@codesourcery.com> wrote: > On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > >> >> GCC can run on other systems besides OSX and GNU/Linux, how can you >> >> test that your change does not break anything on those sy

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-07-29 Thread Prathamesh Kulkarni
On 29 July 2016 at 05:40, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 28 July 2016 at 20:14, Ramana Radhakrishnan > <ramana.radhakrish...@arm.com> wrote: >> >>> appear UNSUPPORTED. >>> That's because this config appears to define >

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-29 Thread Prathamesh Kulkarni
On 29 July 2016 at 12:42, Richard Biener <rguent...@suse.de> wrote: > On Fri, 29 Jul 2016, Prathamesh Kulkarni wrote: > >> On 28 July 2016 at 19:18, Richard Biener <rguent...@suse.de> wrote: >> > On Thu, 28 Jul 2016, Prathamesh Kulkarni wrote: >> > >

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-28 Thread Prathamesh Kulkarni
On 28 July 2016 at 19:18, Richard Biener <rguent...@suse.de> wrote: > On Thu, 28 Jul 2016, Prathamesh Kulkarni wrote: > >> On 28 July 2016 at 15:58, Andreas Schwab <sch...@suse.de> wrote: >> > On Mo, Jul 25 2016, Prathamesh Kulkarni <prathamesh.kulka...@lina

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-07-28 Thread Prathamesh Kulkarni
On 28 July 2016 at 20:39, Richard Earnshaw <richard.earns...@foss.arm.com> wrote: > On 28/07/16 14:36, Prathamesh Kulkarni wrote: >> Um I had configured with --with-tune=cortex-a9. Is that incorrect for >> armv8l-unknown-linux-gnueabihf ? > > Why on earth would you want

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-07-28 Thread Prathamesh Kulkarni
On 28 July 2016 at 20:14, Ramana Radhakrishnan wrote: > >> appear UNSUPPORTED. >> That's because this config appears to define >> __ARM_ARCH_EXT_IDIV__ however idiv appears not to be present. >> >> For instance __aeabi_div is called to perform >> division for the

divmod transform: add test-cases

2016-07-28 Thread Prathamesh Kulkarni
Hi, The following patch adds test-cases for divmod transform. I separated the SImode tests into separate file from DImode tests because certain arm configs (cortex-15) have hardware div insn for SImode but not for DImode, and for that config we want SImode tests to be disabled but not DImode

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-07-28 Thread Prathamesh Kulkarni
On 27 July 2016 at 18:56, Ramana Radhakrishnan <ramana@googlemail.com> wrote: > On Wed, May 25, 2016 at 1:49 PM, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> On 23 May 2016 at 14:28, Prathamesh Kulkarni >> <prathamesh.kulka...@linaro.o

Re: RFC [1/2] divmod transform

2016-07-28 Thread Prathamesh Kulkarni
On 8 June 2016 at 19:53, Richard Biener wrote: > On Fri, 3 Jun 2016, Jim Wilson wrote: > >> On Mon, May 30, 2016 at 12:45 AM, Richard Biener wrote: >> > Joseph - do you know sth about why there's not a full set of divmod >> > libfuncs in libgcc? >> >>

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-28 Thread Prathamesh Kulkarni
On 28 July 2016 at 15:58, Andreas Schwab <sch...@suse.de> wrote: > On Mo, Jul 25 2016, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> > wrote: > >> diff --git a/gcc/testsuite/gcc.dg/pr70920-4.c >> b/gcc/testsuite/gcc.dg/pr70920-4.c >> new fil

Re: [PR71078] x / abs(x) -> copysign (1.0, x)

2016-07-27 Thread Prathamesh Kulkarni
On 26 July 2016 at 17:41, Richard Biener <rguent...@suse.de> wrote: > On Mon, 25 Jul 2016, Prathamesh Kulkarni wrote: > >> Hi, >> The attached patch tries to fix PR71078. >> I am not sure if I have got the converts right. >> I put (convert? @0) and (convert1?

Re: [PATCH] Replacing gcc's dependence on libiberty's fnmatch to gnulib's fnmatch

2016-07-26 Thread Prathamesh Kulkarni
On 26 July 2016 at 19:21, ayush goel wrote: > On 26 July 2016 at 3:38:59 AM, Manuel López-Ibáñez > (lopeziba...@gmail.com) wrote: >> On 25 July 2016 at 18:18, ayush goel wrote: >> > On top of the previously filed patch for importing gnulib (the link >> > isn’t available

Re: warn for dead function calls [4/4] stor-layout.c fallout

2016-07-26 Thread Prathamesh Kulkarni
On 26 July 2016 at 17:07, Richard Biener <rguent...@suse.de> wrote: > On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > >> The following is an interesting case which broke stor-layout.c. >> The patch warned for the following call to be dead from >> bit_

Re: warn for dead function calls [3/4] testsuite fallout

2016-07-26 Thread Prathamesh Kulkarni
On 26 July 2016 at 17:06, Richard Biener <rguent...@suse.de> wrote: > On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > >> Hi, >> The following test-cases broke due to the warning. >> I think however the warning is right for all the cases: >> >> a) g

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-26 Thread Prathamesh Kulkarni
On 26 July 2016 at 17:28, Richard Biener <rguent...@suse.de> wrote: > On Mon, 25 Jul 2016, Prathamesh Kulkarni wrote: > >> On 25 July 2016 at 14:32, Richard Biener <rguent...@suse.de> wrote: >> > On Mon, 25 Jul 2016, Prathamesh Kulkarni wrote: >> > >&g

warn on dead function calls [2/4] libsupc++/eh_alloc.cc fallout

2016-07-25 Thread Prathamesh Kulkarni
Many warnings for dead-calls are emitted with patch on call to operator new in libsupc++/eh_alloc.cc, which I am not sure are correct or false positives, for instance: /home/prathamesh.kulkarni/gcc-svn/trunk/libstdc++-v3/libsupc++/eh_alloc.cc:170:22: warning: Call from void*

warn for dead function calls [4/4] stor-layout.c fallout

2016-07-25 Thread Prathamesh Kulkarni
The following is an interesting case which broke stor-layout.c. The patch warned for the following call to be dead from bit_field_mode_iterator::next_mode() to get_mode_alignment (): /* Stop if the mode requires too much alignment. */ if (GET_MODE_ALIGNMENT (m_mode) > m_align

[RFC] warn on dead function calls in ipa-pure-const [1/4]

2016-07-25 Thread Prathamesh Kulkarni
Hi, The attached patch emits warnings for functions found to be pure or const by the ipa-pure-const pass. It does not warn for functions with unused return values that have been declared as pure or const by the user since this is already handled in C and C++ FE's. I have split it into parts to

warn for dead function calls [3/4] testsuite fallout

2016-07-25 Thread Prathamesh Kulkarni
Hi, The following test-cases broke due to the warning. I think however the warning is right for all the cases: a) g++.dg/tree-ssa/invalid-dom.C: I believe the call from main() to E::bar() is dead call ? b) libffi/testsuite/libffi.call/float.c: Call from main() to floating() is dead call. c)

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-25 Thread Prathamesh Kulkarni
On 25 July 2016 at 14:32, Richard Biener <rguent...@suse.de> wrote: > On Mon, 25 Jul 2016, Prathamesh Kulkarni wrote: > >> Hi Richard, >> The attached patch tries to fix PR70920. >> It adds your pattern from comment 1 in the PR >> (with additional gating on

[PR71078] x / abs(x) -> copysign (1.0, x)

2016-07-25 Thread Prathamesh Kulkarni
Hi, The attached patch tries to fix PR71078. I am not sure if I have got the converts right. I put (convert? @0) and (convert1? (abs @1)) to match for cases when operands's types may be different from outermost type like in pr71078-3.c test-case (included in patch). Bootstrap+test in progress on

[PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-24 Thread Prathamesh Kulkarni
Hi Richard, The attached patch tries to fix PR70920. It adds your pattern from comment 1 in the PR (with additional gating on INTEGRAL_TYPE_P to avoid regressing finalize_18.f90) and second pattern, which is reverse of the first transform. I needed to update ssa-dom-branch-1.c because with patch

fix typo in comment in tree-ssa-strlen.c

2016-07-21 Thread Prathamesh Kulkarni
Committed as obvious (r238588). Thanks, Prathamesh Index: tree-ssa-strlen.c === --- tree-ssa-strlen.c (revision 238587) +++ tree-ssa-strlen.c (working copy) @@ -2383,7 +2383,7 @@ }; /* Callback for walk_dominator_tree.

Re: fold x ^ y to 0 if x == y

2016-07-20 Thread Prathamesh Kulkarni
On 20 July 2016 at 23:07, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 20 July 2016 at 16:35, Richard Biener <rguent...@suse.de> wrote: >> On Wed, 20 Jul 2016, Prathamesh Kulkarni wrote: >> >>> On 8 July 2016 at 12:29, Richard Biener <rg

Re: fold x ^ y to 0 if x == y

2016-07-20 Thread Prathamesh Kulkarni
On 20 July 2016 at 16:35, Richard Biener <rguent...@suse.de> wrote: > On Wed, 20 Jul 2016, Prathamesh Kulkarni wrote: > >> On 8 July 2016 at 12:29, Richard Biener <rguent...@suse.de> wrote: >> > On Fri, 8 Jul 2016, Richard Biener wrote: >> > >>

Re: fold x ^ y to 0 if x == y

2016-07-20 Thread Prathamesh Kulkarni
On 8 July 2016 at 12:29, Richard Biener <rguent...@suse.de> wrote: > On Fri, 8 Jul 2016, Richard Biener wrote: > >> On Fri, 8 Jul 2016, Prathamesh Kulkarni wrote: >> >> > Hi Richard, >> > For the following test-case: >> > >> > int f(i

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-07-20 Thread Prathamesh Kulkarni
ping * 3 https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02008.html Thanks, Prathamesh On 29 June 2016 at 22:09, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > ping * 2 https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02008.html > > Thanks, > Prathamesh > >

Re: move increase_alignment from simple to regular ipa pass

2016-07-20 Thread Prathamesh Kulkarni
ping * 3 https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01703.html Thanks, Prathamesh On 5 July 2016 at 10:53, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > ping * 2 ping https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01703.html > > Thanks, > Prathamesh > >

Re: [RFC][IPA-VRP] Add support for IPA VRP in ipa-cp/ipa-prop

2016-07-17 Thread Prathamesh Kulkarni
On 15 July 2016 at 05:46, kugan wrote: > Hi, > > > > This patch extends ipa-cp/ipa-prop infrastructure to handle propagation of > VR. Hi Kugan, Just a small nit - perhaps you should modify ipa_print_node_jump_functions_for_edge () to pretty-print value ranges

fold x ^ y to 0 if x == y

2016-07-08 Thread Prathamesh Kulkarni
Hi Richard, For the following test-case: int f(int x, int y) { int ret; if (x == y) ret = x ^ y; else ret = 1; return ret; } I was wondering if x ^ y should be folded to 0 since it's guarded by condition x == y ? optimized dump shows: f (int x, int y) { int iftmp.0_1;

Re: move increase_alignment from simple to regular ipa pass

2016-07-05 Thread Prathamesh Kulkarni
ping * 2 ping https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01703.html Thanks, Prathamesh On 28 June 2016 at 14:49, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > ping https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01703.html > > Thanks, > Prathamesh > >

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-06-29 Thread Prathamesh Kulkarni
ping * 2 https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02008.html Thanks, Prathamesh On 7 June 2016 at 13:56, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > ping https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02008.html > > Thanks, > Prathamesh > >

Re: move increase_alignment from simple to regular ipa pass

2016-06-28 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01703.html Thanks, Prathamesh On 23 June 2016 at 22:51, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 17 June 2016 at 19:52, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> On 14 June 2

Re: move increase_alignment from simple to regular ipa pass

2016-06-23 Thread Prathamesh Kulkarni
On 17 June 2016 at 19:52, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 14 June 2016 at 18:31, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> On 13 June 2016 at 16:13, Jan Hubicka <hubi...@ucw.cz> wrote: >>>> diff --gi

Re: move increase_alignment from simple to regular ipa pass

2016-06-17 Thread Prathamesh Kulkarni
On 14 June 2016 at 18:31, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 13 June 2016 at 16:13, Jan Hubicka <hubi...@ucw.cz> wrote: >>> diff --git a/gcc/cgraph.h b/gcc/cgraph.h >>> index ecafe63..41ac408 100644 >>> --- a/gcc/cgraph.h >

Re: move increase_alignment from simple to regular ipa pass

2016-06-14 Thread Prathamesh Kulkarni
On 13 June 2016 at 16:13, Jan Hubicka wrote: >> diff --git a/gcc/cgraph.h b/gcc/cgraph.h >> index ecafe63..41ac408 100644 >> --- a/gcc/cgraph.h >> +++ b/gcc/cgraph.h >> @@ -1874,6 +1874,9 @@ public: >> if we did not do any inter-procedural code movement. */ >>unsigned

Re: move increase_alignment from simple to regular ipa pass

2016-06-13 Thread Prathamesh Kulkarni
On 10 June 2016 at 16:47, Richard Biener <rguent...@suse.de> wrote: > On Fri, 10 Jun 2016, Prathamesh Kulkarni wrote: > >> On 10 June 2016 at 01:53, Jan Hubicka <hubi...@ucw.cz> wrote: >> >> On 8 June 2016 at 20:38, Jan Hubicka <hubi...@ucw.cz> wrote:

Re: move increase_alignment from simple to regular ipa pass

2016-06-10 Thread Prathamesh Kulkarni
On 10 June 2016 at 01:53, Jan Hubicka wrote: >> On 8 June 2016 at 20:38, Jan Hubicka wrote: >> >> I think it would be nice to work towards transitioning >> >> flag_section_anchors to a flag on varpool nodes, thereby removing >> >> the Optimization flag from

Re: [ARM] implement division using vrecpe/vrecps with -funsafe-math-optimizations

2016-06-10 Thread Prathamesh Kulkarni
On 7 June 2016 at 14:07, Ramana Radhakrishnan wrote: >>> Please find the updated patch attached. >>> It passes testsuite for arm-none-linux-gnueabi, arm-none-linux-gnueabihf and >>> arm-none-eabi. >>> However the test-case added in the patch (neon-vect-div-1.c) fails to

Re: move increase_alignment from simple to regular ipa pass

2016-06-09 Thread Prathamesh Kulkarni
On 8 June 2016 at 20:38, Jan Hubicka wrote: >> I think it would be nice to work towards transitioning >> flag_section_anchors to a flag on varpool nodes, thereby removing >> the Optimization flag from common.opt:fsection-anchors >> >> That would simplify the walk over varpool

Re: increase alignment of global structs in increase_alignment pass

2016-06-08 Thread Prathamesh Kulkarni
On 7 June 2016 at 20:17, Wilco Dijkstra wrote: > > After your commit these tests fail on AArch64: > > UNRESOLVED: gcc.dg/vect/section-anchors-vect-70.c scan-ipa-dump-times > increase_alignment "Increasing alignment of decl" 0 > UNRESOLVED:

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-06-07 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-05/msg02008.html Thanks, Prathamesh On 25 May 2016 at 18:19, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 23 May 2016 at 14:28, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> Hi,

Re: [ARM] implement division using vrecpe/vrecps with -funsafe-math-optimizations

2016-06-07 Thread Prathamesh Kulkarni
On 30 May 2016 at 13:52, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 23 May 2016 at 14:59, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> On 5 February 2016 at 18:40, Prathamesh Kulkarni >> <prathamesh.kulka...@linaro.org>

[ipa-comdats] create a new comdat group for symbol if it's referenced from multiple comdat groups

2016-06-02 Thread Prathamesh Kulkarni
Hi, I was trying to address first TODO from ipa-comdats.c (attached patch) TODO: When symbol is used only by comdat symbols, but from different groups, it would make sense to produce a new comdat group for it with anonymous name. The patch simply puts symbol in a new comdat group and makes symbol

Re: move increase_alignment from simple to regular ipa pass

2016-06-02 Thread Prathamesh Kulkarni
On 2 June 2016 at 14:44, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 2 June 2016 at 13:23, Richard Biener <rguent...@suse.de> wrote: >> On Thu, 2 Jun 2016, Prathamesh Kulkarni wrote: >> >>> On 1 June 2016 at 18:37, Richard Biener <rguent

Re: move increase_alignment from simple to regular ipa pass

2016-06-02 Thread Prathamesh Kulkarni
On 2 June 2016 at 13:23, Richard Biener <rguent...@suse.de> wrote: > On Thu, 2 Jun 2016, Prathamesh Kulkarni wrote: > >> On 1 June 2016 at 18:37, Richard Biener <rguent...@suse.de> wrote: >> > On Wed, 1 Jun 2016, Prathamesh Kulkarni wrote: >> > >&g

Re: move increase_alignment from simple to regular ipa pass

2016-06-02 Thread Prathamesh Kulkarni
On 1 June 2016 at 18:37, Richard Biener <rguent...@suse.de> wrote: > On Wed, 1 Jun 2016, Prathamesh Kulkarni wrote: > >> Hi Richard, >> This patch tries to move increase_alignment pass from small to regular ipa >> pass. >> Does the patch look correct ? >&

move increase_alignment from simple to regular ipa pass

2016-06-01 Thread Prathamesh Kulkarni
Hi Richard, This patch tries to move increase_alignment pass from small to regular ipa pass. Does the patch look correct ? Since we are only increasing alignment of varpool nodes, I am not sure if any ipa read/write hooks were necessary and passed NULL for them. Cross-tested on arm*-*-*,

Re: RFC [1/2] divmod transform

2016-05-31 Thread Prathamesh Kulkarni
On 30 May 2016 at 13:15, Richard Biener <rguent...@suse.de> wrote: > On Mon, 30 May 2016, Prathamesh Kulkarni wrote: > >> The attached patch ICE's during bootstrap for x86_64, and is reproducible >> with >> following case with -m32 -O2: >> >> typedef l

Re: [ARM] implement division using vrecpe/vrecps with -funsafe-math-optimizations

2016-05-30 Thread Prathamesh Kulkarni
On 23 May 2016 at 14:59, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 5 February 2016 at 18:40, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> On 4 February 2016 at 16:31, Ramana Radhakrishnan >> <ramana@googlemail.com>

Re: RFC [1/2] divmod transform

2016-05-29 Thread Prathamesh Kulkarni
On 27 May 2016 at 17:31, Richard Biener <rguent...@suse.de> wrote: > On Fri, 27 May 2016, Prathamesh Kulkarni wrote: > >> On 27 May 2016 at 15:45, Richard Biener <rguent...@suse.de> wrote: >> > On Wed, 25 May 2016, Prathamesh Kulkarni wrote: >> > >

Re: RFC [1/2] divmod transform

2016-05-27 Thread Prathamesh Kulkarni
On 27 May 2016 at 15:45, Richard Biener <rguent...@suse.de> wrote: > On Wed, 25 May 2016, Prathamesh Kulkarni wrote: > >> On 25 May 2016 at 12:52, Richard Biener <rguent...@suse.de> wrote: >> > On Tue, 24 May 2016, Prathamesh Kulkarni wrote: >> > >

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-05-25 Thread Prathamesh Kulkarni
On 23 May 2016 at 14:28, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > Hi, > This patch overrides expand_divmod_libfunc for ARM port and adds test-cases. > I separated the SImode tests into separate file from DImode tests > because certain arm configs (cortex-15)

Re: RFC [1/2] divmod transform

2016-05-25 Thread Prathamesh Kulkarni
On 25 May 2016 at 12:52, Richard Biener <rguent...@suse.de> wrote: > On Tue, 24 May 2016, Prathamesh Kulkarni wrote: > >> On 24 May 2016 at 19:39, Richard Biener <rguent...@suse.de> wrote: >> > On Tue, 24 May 2016, Prathamesh Kulkarni wrote: >> > >

Re: RFC [1/2] divmod transform

2016-05-24 Thread Prathamesh Kulkarni
On 24 May 2016 at 19:39, Richard Biener <rguent...@suse.de> wrote: > On Tue, 24 May 2016, Prathamesh Kulkarni wrote: > >> On 24 May 2016 at 17:42, Richard Biener <rguent...@suse.de> wrote: >> > On Tue, 24 May 2016, Prathamesh Kulkarni wrote: >> > >

Re: RFC [1/2] divmod transform

2016-05-24 Thread Prathamesh Kulkarni
On 24 May 2016 at 17:42, Richard Biener <rguent...@suse.de> wrote: > On Tue, 24 May 2016, Prathamesh Kulkarni wrote: > >> On 23 May 2016 at 17:35, Richard Biener <richard.guent...@gmail.com> wrote: >> > On Mon, May 23, 2016 at 10:58 AM, Prathamesh Kulkarni >

Re: RFC [1/2] divmod transform

2016-05-24 Thread Prathamesh Kulkarni
On 23 May 2016 at 17:35, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, May 23, 2016 at 10:58 AM, Prathamesh Kulkarni > <prathamesh.kulka...@linaro.org> wrote: >> Hi, >> I have updated my patch for divmod (attached), which was originally >>

Re: [ARM] implement division using vrecpe/vrecps with -funsafe-math-optimizations

2016-05-23 Thread Prathamesh Kulkarni
On 5 February 2016 at 18:40, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > On 4 February 2016 at 16:31, Ramana Radhakrishnan > <ramana@googlemail.com> wrote: >> On Sun, Jan 17, 2016 at 9:06 AM, Prathamesh Kulkarni >> <prathamesh.kulka...@linar

<    3   4   5   6   7   8   9   10   >