Re: [PATCH][2 of 2] RTL expansion for zero sign extension elimination with VRP

2013-09-26 Thread Kugan Vivekanandarajah
Hi, This is the updated patch for expanding gimple stmts without zer/sign extensions when it is safe to do that. This is based on the latest changes to propagating value range information to SSA_NAMEs and addresses review comments from Eric. Bootstrapped and regtested on

[PR71252][PR71269] Fix trunk errors due to stmt_to_insert

2016-05-25 Thread Kugan Vivekanandarajah
inserted. If that is not the case, we have to insert the stmt_to_insert before calling build_and_add_sum. 4. I also moved all the other stmt_to_insert insertion after the use stmt are created. Also regression tested on x86-64-linux gnu with no new regressions. Is this OK for trunk, Thanks, Kugan gcc/

[PATCH1][PR71252] Fix missing swap to stmt_to_insert

2016-05-27 Thread Kugan Vivekanandarajah
for trunk if the testing is fine ? Thanks, Kugan gcc/ChangeLog: 2016-05-28 Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> * tree-ssa-reassoc.c (swap_ops_for_binary_stmt): Fix swap such that all fields including stmt_to_insert are swapped. gcc/testsuite/ChangeLog: 2016-05-28

[PATCH2][PR71252] Fix insertion point of stmt_to_insert

2016-05-27 Thread Kugan Vivekanandarajah
PRs Thanks, Kugan gcc/testsuite/ChangeLog: 2016-05-28 Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> * gcc.dg/tree-ssa/pr71269.c: New test. gcc/ChangeLog: 2016-05-28 Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> * tree-ssa-reassoc.c (insert_stm

Re: [PR71252][PR71269] Fix trunk errors due to stmt_to_insert

2016-05-26 Thread Kugan Vivekanandarajah
Hi Jakub, On 26 May 2016 at 18:18, Jakub Jelinek <ja...@redhat.com> wrote: > On Thu, May 26, 2016 at 02:17:56PM +1000, Kugan Vivekanandarajah wrote: >> --- a/gcc/tree-ssa-reassoc.c >> +++ b/gcc/tree-ssa-reassoc.c >> @@ -3767,8 +3767,10 @@ swap_o

[PATCH] Fix PR tree-optimization/71179

2016-05-19 Thread Kugan Vivekanandarajah
tested on x86-64-linux-gnu with no new regressions. Is this OK for trunk? Thanks, Kugan gcc/testsuite/ChangeLog: 2016-05-20 Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> * gcc.dg/tree-ssa/pr71179.c: New test. gcc/ChangeLog: 2016-05-20 Kugan Vivekanand

Re: [PATCH] Fix PR tree-optimization/71170

2016-05-19 Thread Kugan Vivekanandarajah
multiplication to > rewrite_expr_tree time. For example by adding a ops->stmt_to_insert > member. > Here is an implementation based on above. Bootstrap on x86-linux-gnu is OK. regression testing is ongoing. Thanks, Kugan gcc/ChangeLog: 2016-05-20 Kugan Vivekanandarajah &

Re: [PATCH] Fix PR tree-optimization/71170

2016-05-21 Thread Kugan Vivekanandarajah
On 20 May 2016 at 21:07, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, May 20, 2016 at 1:51 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >>> I think it should have the same rank as op or op + 1 which

Re: [PATCH] Fix PR tree-optimization/71170

2016-05-23 Thread Kugan Vivekanandarajah
On 23 May 2016 at 21:35, Richard Biener <richard.guent...@gmail.com> wrote: > On Sat, May 21, 2016 at 8:08 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> On 20 May 2016 at 21:07, Richard Biener <richard.guent...@gmail.com> wrote: >&

Re: [PATCH] Fix PR tree-optimization/71170

2016-05-19 Thread Kugan Vivekanandarajah
On 19 May 2016 at 18:55, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, May 19, 2016 at 10:26 AM, Kugan > <kugan.vivekanandara...@linaro.org> wrote: >> Hi, >> >> >> On 19/05/16 18:21, Richard Biener wrote: >>> On Th

Re: [RFC] Type promotion pass and elimination of zext/sext

2016-05-22 Thread Kugan Vivekanandarajah
Hi Jeff, On 20 May 2016 at 04:17, Jeff Law <l...@redhat.com> wrote: > On 05/15/2016 06:45 PM, Kugan Vivekanandarajah wrote: >> >> Hi Richard, >> >> Now that stage1 is open, I would like to get the type promotion passes >> reviewed again. I hav

Re: [RFC] Type promotion pass and elimination of zext/sext

2016-05-22 Thread Kugan Vivekanandarajah
Hi Richard, > So what does this mean for this pass? It means that we need to think > about the immediate goal we want to fulfil - which might be to just > promote things that we can fully promote, avoiding the necessity to > prevent passes from undoing our work. That said - we need a set of >

Re: [PATCH] Fix PR tree-optimization/71170

2016-05-24 Thread Kugan Vivekanandarajah
On 24 May 2016 at 18:36, Christophe Lyon <christophe.l...@linaro.org> wrote: > On 24 May 2016 at 05:13, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> On 23 May 2016 at 21:35, Richard Biener <richard.guent...@gmail.com> wrote: >>>

[PR71252][PATCH] ICE: verify_ssa failed

2016-05-24 Thread Kugan Vivekanandarajah
in reducing the test-case is appreciated. Regression testing on x86_64-linux-gnu and bootstrap didn’t find any new issues. Is this OK for trunk? Thanks, Kugan gcc/testsuite/ChangeLog: 2016-05-24 Kugan Vivekanandarajah <kug...@linaro.org> * gfortran.dg/pr71252.f90: New test. gcc/ChangeLog:

Re: [PATCH] Fix PR tree-optimization/71170

2016-05-19 Thread Kugan Vivekanandarajah
Hi Martin, Thanks for the fix. Just to elaborate (as mentioned in PR) At tree-ssa-reassoc.c:3897, we have: stmt: _15 = _4 + c_7(D); oe->op def_stmt: _17 = c_7(D) * 3; : a1_6 = s_5(D) * 2; _1 = (long int) a1_6; x1_8 = _1 + c_7(D); a2_9 = s_5(D) * 4; _2 = (long int) a2_9; a3_11 = s_5(D) * 6;

[AARCH64] Remove static variable all_extensions from aarch64.c

2016-05-16 Thread Kugan Vivekanandarajah
Hi, static variable all_extensions in aarch64.c is not used and therefore dead. I don’t see any reason why it should be there. Attached patch removes this. Bootstrapped on aarch64-linux-gnu. Regression testing is ongoing. Is this OK for trunk? Thanks, Kugan gcc/ChangeLog: 2016-05-17 Kugan

[RFC] Type promotion pass and elimination of zext/sext

2016-05-15 Thread Kugan Vivekanandarajah
that based on the feedback. Please let me know what you thing. Thanks, Kugan From 332e0e9f938c6af50e826d8224d07ebf3678a0e0 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> Date: Fri, 13 May 2016 13:41:01 +1000 Subject: [PATCH 4/4] Add new type promotio

Re: [RFC][PATCH][PR40921] Convert x + (-y * z * z) into x - y * z * z

2016-05-18 Thread Kugan Vivekanandarajah
>>> Please move the whole thing under the else { } case of the ops.length >>> == 0, ops.length == 1 test chain >>> as you did for the actual emit of the negate. >>> >> >> I see your point. However, when we remove the (-1) from the ops list, that >> intern can result in ops.length becoming 1.

Re: [RFC][PR61839]Convert CST BINOP COND_EXPR to COND_EXPR ? (CST BINOP 1) : (CST BINOP 0)

2016-08-08 Thread Kugan Vivekanandarajah
dified version which checks for two-valued variable and uses this to optimize. In the attached test case (in function bar), we end up doing the conversion twice. Bootstrapped and regression tested on x86_64-linux-gnu without no new regressions. Is this OK for trunk? Thanks, Kugan gcc/testsuite/Ch

Re: [RFC][PR61839]Convert CST BINOP COND_EXPR to COND_EXPR ? (CST BINOP 1) : (CST BINOP 0)

2016-08-19 Thread Kugan Vivekanandarajah
gt; "invalid" >> ops like x % 0 or x / 0, so no need to explicitely guard this here. > > > Sorry, I misunderstood you. I have changed it now. I also added test-case to > check this. > > Bootstrapped and regression tested on x86_64-linux-gnu with no new > regressions

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-19 Thread Kugan Vivekanandarajah
hanged as an argument. > > The way I am fixing this now is, in linearize_expr_tree, I set ops_changed > to true if we change NEGATE_EXPR to (-1) MULT_EXPR (OP). Then when we call > zero_one_operation with ops_changed = true, I replace all the LHS in > zero_one_operation with the new

[TREE-SSA-CCP] Issue warning when folding condition

2016-08-18 Thread Kugan Vivekanandarajah
-ssa-ccp.c. We might also run into some other similar issues in the future. Bootstrapped and regression tested on x86_64-linux-gnu with no new regressions. Is this OK for trunk? Thanks, Kugan gcc/ChangeLog: 2016-08-18 Kugan Vivekanandarajah <kug...@linaro.org> * tree-ssa

Re: [TREE-SSA-CCP] Issue warning when folding condition

2016-08-18 Thread Kugan Vivekanandarajah
On 19 August 2016 at 12:09, Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> wrote: > The testcase pr33738.C for warning fails with early-vrp patch. The > reason is, with early-vrp ccp2 is folding the comparison that used to > be folded in simplify_stmt_for_jump_threadi

Re: [RFC][SSA] Iterator to visit SSA

2016-09-05 Thread Kugan Vivekanandarajah
Hi Richard, On 5 September 2016 at 17:57, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, Sep 5, 2016 at 7:26 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi All, >> >> While looking at gcc source, I noticed that w

Re: [RFC][SSA] Iterator to visit SSA

2016-09-06 Thread Kugan Vivekanandarajah
Hi Richard, On 6 September 2016 at 19:08, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Sep 6, 2016 at 2:24 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >> On 5 September 2016 at 17:57, Richar

Re: [RFC][SSA] Iterator to visit SSA

2016-09-06 Thread Kugan Vivekanandarajah
Hi Richard, On 6 September 2016 at 19:57, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Sep 6, 2016 at 11:33 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >> On 6 September 2016 at 19:08, Richar

Re: [RFC][SSA] Iterator to visit SSA

2016-09-06 Thread Kugan Vivekanandarajah
Hi Richard, On 6 September 2016 at 19:08, Richard Biener <richard.guent...@gmail.com> wrote: > On Tue, Sep 6, 2016 at 2:24 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >> On 5 September 2016 at 17:57, Richar

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-02 Thread Kugan Vivekanandarajah
Hi Richard, On 25 August 2016 at 22:24, Richard Biener wrote: > On Thu, Aug 11, 2016 at 1:09 AM, kugan > wrote: >> Hi, >> >> >> On 10/08/16 20:28, Richard Biener wrote: >>> >>> On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek

Re: [RFC][IPA-VRP] Early VRP Implementation

2016-09-02 Thread Kugan Vivekanandarajah
Ping ? Thanks, Kugan On 23 August 2016 at 12:11, Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> wrote: > Hi, > > On 19 August 2016 at 21:41, Richard Biener <richard.guent...@gmail.com> wrote: >> On Tue, Aug 16, 2016 at 9:45 AM, kugan >> <kuga

[RFC][SSA] Iterator to visit SSA

2016-09-04 Thread Kugan Vivekanandarajah
/ChangeLog: 2016-09-05 Kugan Vivekanandarajah <kug...@linaro.org> * tree-ssanames.h (ssa_iterator::ssa_iterator): New. (ssa_iterator::get): Likewise. (ssa_iterator::next): Likewise. (FOR_EACH_SSAVAR): Likewise. * cfgexpand.c (update_alias_info_with_stack_vars

Re: [RFC][SSA] Iterator to visit SSA

2016-09-07 Thread Kugan Vivekanandarajah
Hi Richard, On 7 September 2016 at 19:35, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Sep 7, 2016 at 2:21 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >> On 6 September 2016 at 19:08, Richar

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

2016-08-29 Thread Kugan Vivekanandarajah
t here. The analysis phase should > not determine > anything if function is reachable non-locally. Removed it. >> +/* Info about value ranges. */ >> + >> +struct GTY(()) ipa_vr >> +{ >> + /* The data fields below are valid only if known is true. */ >

Re: [RFC][IPA-VRP] Early VRP Implementation

2016-08-22 Thread Kugan Vivekanandarajah
Hi, On 19 August 2016 at 21:41, Richard Biener wrote: > On Tue, Aug 16, 2016 at 9:45 AM, kugan > wrote: >> Hi Richard, >> >> On 12/08/16 20:43, Richard Biener wrote: >>> >>> On Wed, Aug 3, 2016 at 3:17 AM, kugan

Re: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341

2017-08-11 Thread Kugan Vivekanandarajah
Ping^2? Thanks, Kugan On 21 July 2017 at 20:12, Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> wrote: > Ping ? > > Thanks, > Kugan > > On 27 June 2017 at 11:20, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> https://gcc.

Re: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341

2017-07-21 Thread Kugan Vivekanandarajah
Ping ? Thanks, Kugan On 27 June 2017 at 11:20, Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> wrote: > https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00614.html added this > workaround to get kernel building with when TARGET_FIX_ERR_A53_843419 > is enabled. >

[AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341

2017-06-26 Thread Kugan Vivekanandarajah
.wrf can be built (with LTO in this case) without -mno-pc-relative-literal-loads Bootstrapped and regression tested on aarch64-linux-gnu with no new regressions. Is this OK for trunk? Thanks, Kugan gcc/testsuite/ChangeLog: 2017-06-27 Kugan Vivekanandarajah <kug...@linaro.org> * gcc.

Re: [PATCH GCC][4/5]Improve loop distribution to handle hmmer

2017-06-04 Thread Kugan Vivekanandarajah
Hi Bin, Thanks for posting the patch. I haven't looked in detail yet but have couple of quick questions. 1. Shouldn’t the run time alias check for versioning happen only when vectorisation is enabled? You seems to be using the IFN_LOOP_DIST_ALIAS when vectoring but seems to be versioning

Re: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341

2017-06-27 Thread Kugan Vivekanandarajah
Hi Ramana, On 27 June 2017 at 18:01, Ramana Radhakrishnan <ramana.radhakrish...@foss.arm.com> wrote: > On 27/06/17 02:20, Kugan Vivekanandarajah wrote: >> >> https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00614.html added this >> workaround to ge

Re: [RFC][AARCH64][PATCH 5/5] add aarch64_loop_unroll_adjust to limit partial unrolling in rtl based on strided-loads in loop

2017-09-16 Thread Kugan Vivekanandarajah
Hi Ramana On 15 September 2017 at 18:40, Ramana Radhakrishnan <ramana@googlemail.com> wrote: > On Fri, Sep 15, 2017 at 2:33 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> This patch adds aarch64_loop_unroll_adjust to limit partial u

Re: [RFC][AARCH64][PATCH 2/5]: Add number of hw prefetchers available to cpu_prefetch_tune

2017-09-16 Thread Kugan Vivekanandarajah
Hi Andrew, On 15 September 2017 at 13:20, Andrew Pinski <pins...@gmail.com> wrote: > On Thu, Sep 14, 2017 at 6:28 PM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> This patch adds number of hw prefetchers available to >> cpu_prefetch_

Re: [RFC][PATCH 1/5] Add separate parms for rtl unroller

2017-09-19 Thread Kugan Vivekanandarajah
Hi Richard, On 18 September 2017 at 17:50, Richard Biener <richard.guent...@gmail.com> wrote: > On Mon, Sep 18, 2017 at 3:36 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >> On 15 September 2017 at 19:31, Richard B

[RFC][PATCH 0/5] Loop unrolling and memory load streams

2017-09-14 Thread Kugan Vivekanandarajah
While loop unrolling helps to keep the pipeline busy in modern processors, it also can increase the memory streams resulting in collisions for the hardware prefetcher that can impact performance. This patch series tries to detect this and limit the loop unrolling. Patch 1 : Add separate parms for

[RFC][PATCH 1/5] Add separate parms for rtl unroller

2017-09-14 Thread Kugan Vivekanandarajah
This patch adds separate params for rtl unroller so that they can be tunned accordingly. Default values I have are based on some testing on aarch64. I am happy to leave it as the current value and set them in the back-end. Thanks, Kugan gcc/ChangeLog: 2017-09-12 Kugan Vivekanandarajah <

[RFC][AARCH64][PATCH 2/5]: Add number of hw prefetchers available to cpu_prefetch_tune

2017-09-14 Thread Kugan Vivekanandarajah
This patch adds number of hw prefetchers available to cpu_prefetch_tune so it can be used in loop unrolling decisions. Thanks, Kugan gcc/ChangeLog: 2017-09-12 Kugan Vivekanandarajah <kug...@linaro.org> * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune): Add new

[RFC][PATCH 4/5] Change iv_analyze_result to take const_rtx.

2017-09-14 Thread Kugan Vivekanandarajah
Change iv_analyze_result to take const_rtx. This is just to make the next patch compile. No functional changes: Thanks, Kugan gcc/ChangeLog: 2017-09-12 Kugan Vivekanandarajah <kug...@linaro.org> * cfgloop.h (iv_analyze_result): Change 2nd param from rtx to const_rtx.

[RFC][PACH 3/5] Prevent tree unroller from completely unrolling inner loops if that results in excessive strided-loads in outer loop

2017-09-14 Thread Kugan Vivekanandarajah
This patch prevent tree unroller from completely unrolling inner loops if that results in excessive strided-loads in outer loop. Thanks, Kugan gcc/ChangeLog: 2017-09-12 Kugan Vivekanandarajah <kug...@linaro.org> * config/aarch64/aarch64.c (count_mem_load_streams

[RFC][AARCH64][PATCH 5/5] add aarch64_loop_unroll_adjust to limit partial unrolling in rtl based on strided-loads in loop

2017-09-14 Thread Kugan Vivekanandarajah
This patch adds aarch64_loop_unroll_adjust to limit partial unrolling in rtl based on strided-loads in loop. Thanks, Kugan gcc/ChangeLog: 2017-09-12 Kugan Vivekanandarajah <kug...@linaro.org> * cfgloop.h (iv_analyze_biv): export. * loop-iv.c: Likewise. * config/aarch64/aar

Re: [RFC][AARCH64][PATCH 5/5] add aarch64_loop_unroll_adjust to limit partial unrolling in rtl based on strided-loads in loop

2017-09-17 Thread Kugan Vivekanandarajah
Hi Andrew, On 15 September 2017 at 13:36, Andrew Pinski <pins...@gmail.com> wrote: > On Thu, Sep 14, 2017 at 6:33 PM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> This patch adds aarch64_loop_unroll_adjust to limit partial unrolling >>

Re: [RFC][PATCH 1/5] Add separate parms for rtl unroller

2017-09-17 Thread Kugan Vivekanandarajah
Hi Richard, On 15 September 2017 at 19:31, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, Sep 15, 2017 at 3:27 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> This patch adds separate params for rtl unroller so that they can

Re: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341

2017-08-29 Thread Kugan Vivekanandarajah
Hi James, On 29 August 2017 at 21:31, James Greenhalgh <james.greenha...@arm.com> wrote: > On Tue, Jun 27, 2017 at 11:20:02AM +1000, Kugan Vivekanandarajah wrote: >> https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00614.html added this >> workaround to get kern

Re: [AARCH64] Disable pc relative literal load irrespective of TARGET_FIX_ERR_A53_84341

2017-08-28 Thread Kugan Vivekanandarajah
ping^3 Thanks, Kugan On 11 August 2017 at 16:09, Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> wrote: > Ping^2? > > Thanks, > Kugan > > On 21 July 2017 at 20:12, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Ping ?

Re: [AARCH64] implements neon vld1_*_x2 intrinsics

2017-11-14 Thread Kugan Vivekanandarajah
Ping? Thanks, Kugan On 7 November 2017 at 15:10, Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> wrote: > Hi, > > Attached patch implements the vld1_*_x2 intrinsics as defined by the > neon document. > > Bootstrap for the latest patch is ongoing on aarch64

Re: [PATCH, AArch64] Disable reg offset in quad-word store for Falkor.

2017-11-01 Thread Kugan Vivekanandarajah
Hi, On 1 November 2017 at 03:12, Jim Wilson <wil...@tuliptree.org> wrote: > On Tue, 2017-10-31 at 14:35 +1100, Kugan Vivekanandarajah wrote: >> Ping ? >> >> I see that Jim has clarified the comments from Andrew. > > Andrew also suggested that we add a testcase

[AARCH64] implements neon vld1_*_x2 intrinsics

2017-11-06 Thread Kugan Vivekanandarajah
Hi, Attached patch implements the vld1_*_x2 intrinsics as defined by the neon document. Bootstrap for the latest patch is ongoing on aarch64-linux-gnu. Is this OK for trunk if no regressions? Thanks, Kugan gcc/ChangeLog: 2017-11-06 Kugan Vivekanandarajah <kug...@linaro.org> *

Re: [PATCH, AArch64] Disable reg offset in quad-word store for Falkor.

2017-10-31 Thread Kugan Vivekanandarajah
Hi Jim, On 1 November 2017 at 03:12, Jim Wilson <wil...@tuliptree.org> wrote: > On Tue, 2017-10-31 at 14:35 +1100, Kugan Vivekanandarajah wrote: >> Ping ? >> >> I see that Jim has clarified the comments from Andrew. > > Andrew also suggested that we add a testcase

Re: [PATCH, AArch64] Disable reg offset in quad-word store for Falkor.

2017-10-30 Thread Kugan Vivekanandarajah
Ping ? I see that Jim has clarified the comments from Andrew. Thanks, Kugan On 13 October 2017 at 08:48, Jim Wilson wrote: > On Fri, 2017-09-22 at 14:11 -0700, Andrew Pinski wrote: >> On Fri, Sep 22, 2017 at 11:39 AM, Jim Wilson >> wrote: >> > >> >

[PR63185][RFC] Improve DSE with branches

2018-05-13 Thread Kugan Vivekanandarajah
Vivekanandarajah <kug...@linaro.org> * tree-ssa-dse.c (phi_dosent_define_nor_use_p): New. (dse_classify_store): Use phi_dosent_define_nor_use_p. gcc/testsuite/ChangeLog: 2018-05-14 Kugan Vivekanandarajah <kug...@linaro.org> * gcc.dg/tree-ssa/ssa-dse-33.c: Ne

Re: [RFC] Improve tree DSE

2018-05-13 Thread Kugan Vivekanandarajah
gt;> tests >> for the store being redundant and simplify the patch considerably. Tried implementing above in the attached patch. Bootstrapped on x86_64-linux-gnu. Full testing is ongoing. Thanks, Kugan gcc/ChangeLog: 2018-05-14 Kugan Vivekanandarajah <kug...@linaro.org>

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-17 Thread Kugan Vivekanandarajah
he whole gcc/ tree doesn't reveal too many > cases of ABS_EXPR so I think it's reasonable to audit all of them. > > I also miss some trivial absu simplifications in match.pd. There are not > a lot of abs cases but similar ones would be good to have initially. I will add them in

Re: [RFC][PR82479] missing popcount builtin detection

2018-05-16 Thread Kugan Vivekanandarajah
Hi Richard, On 6 March 2018 at 02:24, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Feb 8, 2018 at 1:41 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >> On 1 February 2018 at 23:21, Richard Biener &l

[RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-16 Thread Kugan Vivekanandarajah
in the correct way. I am not sure I am not doing all that is needed. I will clean up and add more test-cases based on the feedback. Thanks, Kugan gcc/ChangeLog: 2018-05-13 Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> * expr.c (expand_expr_real_2): Handle ABSU_EXPR. * fold-c

Re: [PR63185][RFC] Improve DSE with branches

2018-05-15 Thread Kugan Vivekanandarajah
Hi Richard, On 15 May 2018 at 19:20, Richard Biener <rguent...@suse.de> wrote: > On Tue, 15 May 2018, Richard Biener wrote: > >> On Mon, 14 May 2018, Kugan Vivekanandarajah wrote: >> >> > Hi, >> > >> > Attached patch handles PR63185 when we reac

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-06-11 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review and sorry for getting back to you late. On 4 June 2018 at 18:38, Richard Biener wrote: > On Mon, Jun 4, 2018 at 10:18 AM Kugan Vivekanandarajah > wrote: >> >> Hi Richard, >> >> Thanks for the review. >> >> On 1

Re: [RFC][PR82479] missing popcount builtin detection

2018-05-30 Thread Kugan Vivekanandarajah
Hi Bin, Thanks for the review. Please find the revised patch based on the review comments. Thanks, Kugan On 17 May 2018 at 19:56, Bin.Cheng wrote: > On Thu, May 17, 2018 at 2:39 AM, Kugan Vivekanandarajah > wrote: >> Hi Richard, >> >> On 6 March 2018 at 02:2

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-06-04 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On 1 June 2018 at 22:20, Richard Biener wrote: > On Fri, Jun 1, 2018 at 4:12 AM Kugan Vivekanandarajah > wrote: >> >> Hi Richard, >> >> This is the revised patch based on the review and the discussion in >> https://gcc.

Re: [RFC][PR64946] "abs" vectorization fails for char/short types

2018-05-31 Thread Kugan Vivekanandarajah
36, Kugan Vivekanandarajah wrote: > Hi Richard, > > Thanks for the review. I am revising the patch based on Andrew's comments too. > > On 17 May 2018 at 20:36, Richard Biener wrote: >> On Thu, May 17, 2018 at 4:56 AM Andrew Pinski wrote: >> >>> On Wed, May 16, 2018

Re: [RFC][PR82479] missing popcount builtin detection

2018-06-01 Thread Kugan Vivekanandarajah
Hi Bin, Thanks a lo for the review. On 1 June 2018 at 03:45, Bin.Cheng wrote: > On Thu, May 31, 2018 at 3:51 AM, Kugan Vivekanandarajah > wrote: >> Hi Bin, >> >> Thanks for the review. Please find the revised patch based on the >> review comments. >> >

Re: [PATCH 3/3][POPCOUNT] Remove unnecessary if condition in phiopt

2018-07-01 Thread Kugan Vivekanandarajah
Hi Richard, On 29 June 2018 at 18:45, Richard Biener wrote: > On Wed, Jun 27, 2018 at 7:09 AM Kugan Vivekanandarajah > wrote: >> >> Hi Richard, >> >> Thanks for the review, >> >> On 25 June 2018 at 20:20, Richard Biener wrote: >> > On F

[ABSU_EXPR] Add some of the missing patterns in match,pd

2018-06-27 Thread Kugan Vivekanandarajah
Hi, This patch adds some of the missing patterns in match.pd for ABSU_EXPR. Bootstrap and regression testing on x86_64-linux-gnu. Is this OK if no regressions. Thanks, Kugan gcc/ChangeLog: 2018-06-28 Kugan Vivekanandarajah * match.pd (absu(x)*absu(x) -> x*x): Handle. (a

Re: [PATCH 0/3][POPCOUNT]

2018-06-24 Thread Kugan Vivekanandarajah
Hi Bin, Thanks for your comments. On 25 June 2018 at 11:15, Bin.Cheng wrote: > On Fri, Jun 22, 2018 at 5:11 PM, Kugan Vivekanandarajah > wrote: >> When we set niter with maybe_zero, currently final_value_relacement >> will not happen due to expression_expensive_p not handlin

Re: [PATCH 0/3][POPCOUNT]

2018-06-24 Thread Kugan Vivekanandarajah
Hi Bin, On 25 June 2018 at 13:56, Bin.Cheng wrote: > On Mon, Jun 25, 2018 at 11:37 AM, Kugan Vivekanandarajah > wrote: >> Hi Bin, >> >> Thanks for your comments. >> >> On 25 June 2018 at 11:15, Bin.Cheng wrote: >>> On Fri, Jun 22, 2018 at 5:11 PM,

Re: [PATCH 0/3][POPCOUNT]

2018-06-24 Thread Kugan Vivekanandarajah
Hi Jeff, Thanks for the comments. On 23 June 2018 at 02:06, Jeff Law wrote: > On 06/22/2018 03:11 AM, Kugan Vivekanandarajah wrote: >> When we set niter with maybe_zero, currently final_value_relacement >> will not happen due to expression_expensive_p not handling.

Re: [PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p

2018-06-26 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On 25 June 2018 at 20:01, Richard Biener wrote: > On Fri, Jun 22, 2018 at 11:13 AM Kugan Vivekanandarajah > wrote: >> >> [PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p > > This says that COND_EXPR itself isn't expen

Re: [PATCH 2/3][POPCOUNT] Check if zero check is done before entering the loop

2018-06-26 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On 25 June 2018 at 20:02, Richard Biener wrote: > On Fri, Jun 22, 2018 at 11:14 AM Kugan Vivekanandarajah > wrote: >> >> gcc/ChangeLog: > > The canonical way is calling simplify_using_initial_conditions on the > may_be_zero condit

Re: [PATCH 3/3][POPCOUNT] Remove unnecessary if condition in phiopt

2018-06-26 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review, On 25 June 2018 at 20:20, Richard Biener wrote: > On Fri, Jun 22, 2018 at 11:16 AM Kugan Vivekanandarajah > wrote: >> >> gcc/ChangeLog: > > @@ -1516,6 +1521,114 @@ minmax_replacement (basic_block cond_bb, > basic_block mi

Re: [RFC] Improve tree DSE

2018-05-01 Thread Kugan Vivekanandarajah
Hi Jeff, Thanks for the review. On 2 May 2018 at 01:43, Jeff Law <l...@redhat.com> wrote: > On 04/09/2018 06:52 PM, Kugan Vivekanandarajah wrote: >> I would like to queue this patch for stage1 review. >> >> In DSE, while in dse_classify_store, as soon as we

Re: [PATCH][arm] XFAIL advsimd-intrinsics/vld1x2.c

2018-01-15 Thread Kugan Vivekanandarajah
Hi Kyrill, Sorry for the breakage and thanks for fixing the testcase. Thanks, Kugan On 12 January 2018 at 02:33, Kyrill Tkachov wrote: > Hi all, > > This recently added test fails on arm. We haven't implemented these > intrinsics for arm > (any volunteers?) so for

[RFC][PR82479] missing popcount builtin detection

2018-01-24 Thread Kugan Vivekanandarajah
that happens in practice. Please correct me if I am wrong. Bootstrapped and regression tested on aarch64-linux-gnu with no new regressions. Thanks, Kugan gcc/ChangeLog: 2018-01-25 Kugan Vivekanandarajah <kug...@linaro.org> PR middle-end/82479 * tree-loop-distribution.c (handle_po

Re: [RFC][PR82479] missing popcount builtin detection

2018-01-31 Thread Kugan Vivekanandarajah
Hi Richard, On 31 January 2018 at 21:39, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Jan 31, 2018 at 11:28 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >> Thanks for the review. >> O

Re: [RFC][PR82479] missing popcount builtin detection

2018-01-31 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On 25 January 2018 at 20:04, Richard Biener <richard.guent...@gmail.com> wrote: > On Wed, Jan 24, 2018 at 10:56 PM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi All, >> >> Here is a patch fo

Re: [RFC][PR82479] missing popcount builtin detection

2018-02-07 Thread Kugan Vivekanandarajah
Hi Richard, On 1 February 2018 at 23:21, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Feb 1, 2018 at 5:07 AM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Richard, >> >> On 31 January 2018 at 21:39, Richard Biener &l

[RFC] Tree loop unroller pass

2018-02-12 Thread Kugan Vivekanandarajah
Hi All, Based on the previous discussions, I tried to implement a tree loop unroller for partial unrolling. I would like to queue this RFC patches for next stage1 review. In summary: * Cost-model for selecting the loop uses the same params used elsewhere in related optimizations. I was told

[RFC][AARCH64] Machine reorg pass for aarch64/Falkor to handle prefetcher tag collision

2018-02-12 Thread Kugan Vivekanandarajah
-10/msg00178.html. gcc/ChangeLog: 2018-02-12 Kugan Vivekanandarajah <kug...@linaro.org> * config/aarch64/aarch64.c (iv_p): New. (strided_load_p): Likwise. (make_tag): Likesie. (get_load_info): Likewise. (aarch64_reorg): Likewise. (TARGET_MACHINE_DEPENDENT

[RFC] Tree Loop Unroller Pass

2018-02-12 Thread Kugan Vivekanandarajah
Implements tree loop unroller using the infrastructure provided. gcc/ChangeLog: 2018-02-12 Kugan Vivekanandarajah <kug...@linaro.org> * Makefile.in (OBJS): Add tree-ssa-loop-unroll.o. * common.opt (ftree-loop-unroll): New option. * passes.def: Add pass_tree_loop

[RFC] Adds a target hook

2018-02-12 Thread Kugan Vivekanandarajah
Adds a target hook TARGET_HW_MAX_MEM_READ_STREAMS. Loop unroller, if defined, will try to limit the unrolling factor based on this. gcc/ChangeLog: 2018-02-12 Kugan Vivekanandarajah <kug...@linaro.org> * doc/tm.texi.in (TARGET_HW_MAX_MEM_READ_STREAMS): Dcoument. * doc/t

[RFC][AARCH64] Implements target hook

2018-02-12 Thread Kugan Vivekanandarajah
Implements target hook TARGET_HW_MAX_MEM_READ_STREAMS for aarch64 gcc/ChangeLog: 2018-02-12 Kugan Vivekanandarajah <kug...@linaro.org> * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune): Add new entry hw_prefetchers_avail. * config/aarch64/aar

Re: [RFC] Adds a target hook

2018-02-13 Thread Kugan Vivekanandarajah
Hi Kyrill, Thanks for the review. On 13 February 2018 at 20:58, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > Hi Kugan, > > On 12/02/18 23:53, Kugan Vivekanandarajah wrote: >> >> Adds a target hook TARGET_HW_MAX_MEM_READ_STREAMS. Loop unroller, if &g

Re: [RFC][AARCH64] Machine reorg pass for aarch64/Falkor to handle prefetcher tag collision

2018-02-13 Thread Kugan Vivekanandarajah
Hi Kyrill, On 13 February 2018 at 20:47, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > Hi Kugan, > > On 12/02/18 23:58, Kugan Vivekanandarajah wrote: >> >> Implements a machine reorg pass for aarch64/Falkor to handle >> prefetcher tag collision. This

Re: [RFC] Tree loop unroller pass

2018-02-19 Thread Kugan Vivekanandarajah
Hi Richard, On 16 February 2018 at 22:56, Richard Biener <richard.guent...@gmail.com> wrote: > On Thu, Feb 15, 2018 at 11:30 PM, Kugan Vivekanandarajah > <kugan.vivekanandara...@linaro.org> wrote: >> Hi Wilko, >> >> Thanks for your comments. >> >&

Re: [RFC][AARCH64] Machine reorg pass for aarch64/Falkor to handle prefetcher tag collision

2018-02-15 Thread Kugan Vivekanandarajah
Hi, On 14 February 2018 at 09:47, Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> wrote: > Hi Kyrill, > > On 13 February 2018 at 20:47, Kyrill Tkachov > <kyrylo.tkac...@foss.arm.com> wrote: >> Hi Kugan, >> >> On 12/02/18 23:58, Kugan

Re: [RFC] Tree loop unroller pass

2018-02-15 Thread Kugan Vivekanandarajah
Hi Wilko, Thanks for your comments. On 14 February 2018 at 00:05, Wilco Dijkstra wrote: > Hi Kugan, > >> Based on the previous discussions, I tried to implement a tree loop >> unroller for partial unrolling. I would like to queue this RFC patches >> for next stage1

[PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p

2018-06-22 Thread Kugan Vivekanandarajah
[PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p gcc/ChangeLog: 2018-06-22 Kugan Vivekanandarajah * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR. From aa38b98dd97567c6032c261f19b3705abc2233b0 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah

[PATCH 2/3][POPCOUNT] Check if zero check is done before entering the loop

2018-06-22 Thread Kugan Vivekanandarajah
gcc/ChangeLog: 2018-06-22 Kugan Vivekanandarajah * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount argument is checked for zero before entering loop, avoid checking again. From 4f2a6ad5a49eec0a1cae15e033329f889f9137b9 Mon Sep 17 00:00:00 2001 From: Kugan

[PATCH 3/3][POPCOUNT] Remove unnecessary if condition in phiopt

2018-06-22 Thread Kugan Vivekanandarajah
gcc/ChangeLog: 2018-06-22 Kugan Vivekanandarajah * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New. (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern. gcc/testsuite/ChangeLog: 2018-06-22 Kugan Vivekanandarajah * gcc.dg/tree-ssa/popcount3.c: New test

[PATCH 0/3][POPCOUNT]

2018-06-22 Thread Kugan Vivekanandarajah
When we set niter with maybe_zero, currently final_value_relacement will not happen due to expression_expensive_p not handling. Patch 1 adds this. With that we have the following optimized gimple. [local count: 118111601]: if (b_4(D) != 0) goto ; [89.00%] else goto ; [11.00%]

Re: [RFC] Fix recent popcount change is breaking

2018-07-27 Thread Kugan Vivekanandarajah
Hi, On 28 July 2018 at 01:13, Richard Biener wrote: > On July 27, 2018 3:33:59 PM GMT+02:00, "Martin Liška" wrote: >>On 07/11/2018 02:31 PM, Richard Biener wrote: >>> Why not simply make popcountdi available in the kernel? They do have >>> implementations for other libgcc functions IIRC. >>

[PR86544] Fix Popcount detection generates different code on C and C++

2018-07-17 Thread Kugan Vivekanandarajah
, Kugan gcc/ChangeLog: 2018-07-18 Kugan Vivekanandarajah PR middle-end/86544 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparison with EQ_EXPR in last stmt. gcc/testsuite/ChangeLog: 2018-07-18 Kugan Vivekanandarajah PR middle-end/86544 * g++.dg

Re: [PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p

2018-07-05 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On 28 June 2018 at 21:26, Richard Biener wrote: > On Wed, Jun 27, 2018 at 7:00 AM Kugan Vivekanandarajah > wrote: >> >> Hi Richard, >> >> Thanks for the review. >> >> On 25 June 2018 at 20:01, Richard Biener wrote: &

Re: [PATCH 1/3][POPCOUNT] Handle COND_EXPR in expression_expensive_p

2018-07-06 Thread Kugan Vivekanandarajah
gressions. Thanks, Kugan gcc/ChangeLog: 2018-07-06 Kugan Vivekanandarajah * tree-scalar-evolution.c (final_value_replacement_loop): Use rewrite_to_non_trapping_overflow instead of rewrite_to_defined_overflow. From 68a4f232f6cde68751f6785059121fe116363886 Mon Sep 17 00:00:00 2001 Fr

[RFC] Fix recent popcount change is breaking

2018-07-10 Thread Kugan Vivekanandarajah
pcount? I am testing the attached RFC patch. Is this reasonable? Thanks, Kugan gcc/ChangeLog: 2018-07-10 Kugan Vivekanandarajah * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check if libfunc for popcount is available. diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tre

  1   2   >