Re: [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-11-29 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/11/30 上午6:06, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 28, 2021 at 04:16:04PM +0800, Kewen.Lin wrote: >> This patch follows the discussions here[1][2], where Segher >> pointed out the existing way to guard the extra penalized >> cost for strided/elementwise loads with a

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-11-29 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/11/30 上午8:16, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 28, 2021 at 04:13:40PM +0800, Kewen.Lin wrote: >> PR target/102347 >> * config/rs6000/rs6000-call.c (rs6000_builtin_decl): Remove builtin >> mask check. > > (Don't wrap lines early please). > Fixed.

Re: [PATCH] rs6000/test: Add emulated gather test case

2021-11-28 Thread Kewen.Lin via Gcc-patches
on 2021/11/27 上午12:24, Segher Boessenkool wrote: > Hi! > > On Thu, Nov 25, 2021 at 11:20:57AM +0800, Kewen.Lin wrote: >> This patch is to add a test case similar to the one in i386 >> to add testing coverage for 510.parest_r hotspots. > >> gcc/testsuite/ChangeLog: >> * gcc.target/powerpc/vec

Re: [PATCH] rs6000/test: Add emulated gather test case

2021-11-24 Thread Kewen.Lin via Gcc-patches
on 2021/11/25 下午1:17, Hongtao Liu wrote: > On Thu, Nov 25, 2021 at 11:21 AM Kewen.Lin via Gcc-patches > wrote: >> >> Hi, >> >> This patch is to add a test case similar to the one in i386 >> to add testing coverage for 510.parest_r hotspots. >> >>

[PATCH] rs6000/test: Add emulated gather test case

2021-11-24 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to add a test case similar to the one in i386 to add testing coverage for 510.parest_r hotspots. As evaluated, the emulated gather capability of vectorizer (r12-2733) can help to speed up SPEC2017 510.parest_r on Power8/9/10 by 5% to 9% with option sets Ofast unroll and Ofast lt

Re: [PATCH] vect: Add bias parameter for partial vectorization

2021-11-21 Thread Kewen.Lin via Gcc-patches
Hi Robin, on 2021/11/12 下午5:56, Robin Dapp wrote: > Hi Kewen and Richard, > > the attached v3 addresses the comments to v2, among others: > > - Rename to load_store where appropriate. > - Save the adjusted length as a separate control that is used instead > of loop_len with a bias != 0 and add

PING^3 [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-11-21 Thread Kewen.Lin via Gcc-patches
Hi, As the discussions and the testing result under the main thread, this patch would be safe. Ping for this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580357.html BR, Kewen >> on 2021/9/28 下午4:13, Kewen.Lin via Gcc-patches wrote: >>> Hi, >>> >>&

PING^6 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-11-21 Thread Kewen.Lin via Gcc-patches
>>>>> on 2021/9/1 下午2:55, Kewen.Lin via Gcc-patches wrote: >>>>>> Hi! >>>>>> >>>>>> This patch is to fix the inconsistent behaviors for non-LTO mode >>>>>> and LTO mode. As Martin pointed out, currently the func

PING^4 [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-11-21 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580358.html BR, Kewen >>> on 2021/9/28 下午4:16, Kewen.Lin via Gcc-patches wrote: >>>> Hi, >>>> >>>> This patch follows the discussions here[1][2], where Segher >>

PING^7 [PATCH v2] combine: Tweak the condition of last_set invalidation

2021-11-21 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572555.html BR, Kewen >>>>>> on 2021/6/11 下午9:16, Kewen.Lin via Gcc-patches wrote: >>>>>>> Hi Segher, >>>>>>> >>>>>>> Thanks for the r

Re: [PATCH 07/15] xtensa: Fix non-robust split condition in define_insn_and_split

2021-11-21 Thread Kewen.Lin via Gcc-patches
on 2021/11/20 上午6:26, augustine.sterl...@gmail.com wrote: > On Thu, Nov 11, 2021 at 3:25 AM Kewen Lin wrote: >> gcc/ChangeLog: >> >> * config/xtensa/xtensa.md (movdi_internal, movdf_internal): Fix split >> condition. > > I had been hoping Max would reply (as I'm just doing legacy

Re: [PATCH 12/15] i386: Fix non-robust split condition in define_insn_and_split

2021-11-17 Thread Kewen.Lin via Gcc-patches
Hi Uros, on 2021/11/17 下午3:13, Uros Bizjak wrote: > On Thu, Nov 11, 2021 at 12:25 PM Kewen Lin wrote: >> >> This patch is to fix some non-robust split conditions in some >> define_insn_and_splits, to make each of them applied on top of >> the corresponding condition for define_insn part, otherwis

Re: [PATCH 06/15] visium: Fix non-robust split condition in define_insn_and_split

2021-11-16 Thread Kewen.Lin via Gcc-patches
Hi Eric, on 2021/11/17 上午12:57, Eric Botcazou wrote: >> gcc/ChangeLog: >> >> * config/visium/visium.md (*add3_insn, *addsi3_insn, *addi3_insn, >> *sub3_insn, *subsi3_insn, *subdi3_insn, *neg2_insn, >> *negdi2_insn, *and3_insn, *ior3_insn, *xor3_insn, >> *one_cmpl2_insn, *ashl3_

Re: [PATCH] rs6000/doc: Rename future cpu with power10

2021-11-11 Thread Kewen.Lin via Gcc-patches
on 2021/11/10 下午6:03, Segher Boessenkool wrote: > Hi! > > On Wed, Nov 10, 2021 at 05:39:27PM +0800, Kewen.Lin wrote: >> @@ -27779,10 +27779,10 @@ Enable/disable the @var{__float128} keyword for >> IEEE 128-bit floating point >> and use either software emulation for IEEE 128-bit floating point or

Re: [PATCH] rs6000/doc: Rename future cpu with power10

2021-11-10 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/11/10 下午4:52, Segher Boessenkool wrote: > Hi! > > On Wed, Nov 10, 2021 at 01:41:25PM +0800, Kewen.Lin wrote: >> Commmit 5d9d0c94588 renamed future to power10 and ace60939fd2 >> updated the documentation for "future" renaming. This patch >> is to rename the remaining "future ar

[PATCH] rs6000/doc: Rename future cpu with power10

2021-11-09 Thread Kewen.Lin via Gcc-patches
Hi, Commmit 5d9d0c94588 renamed future to power10 and ace60939fd2 updated the documentation for "future" renaming. This patch is to rename the remaining "future architecture" references in documentation. Is it ok for trunk? BR, Kewen - gcc/ChangeLog: * doc/invoke.texi: Change refer

Re: Values of WIDE_INT_MAX_ELTS in gcc11 and gcc12 are different

2021-11-04 Thread Kewen.Lin via Gcc-patches
Hi Qing, on 2021/11/5 上午4:37, Qing Zhao via Gcc-patches wrote: > Hi, > > I noticed that the macro “WIDE_INT_MAX_ELTS” has different values in GCC11 > and GCC12 (on the same X86 machine) > > For gcc11: > > wide int max elts =3 > > For gcc12: > > wide int max elts =9 > > Does anyone know what

PING^2 [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-11-04 Thread Kewen.Lin via Gcc-patches
Hi, As the discussions and the testing result under the main thread, this patch would be safe. Ping for this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580357.html BR, Kewen > > on 2021/9/28 下午4:13, Kewen.Lin via Gcc-patches wrote: >> Hi, >> >> As th

PING^5 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-11-04 Thread Kewen.Lin via Gcc-patches
>>>> on 2021/9/1 下午2:55, Kewen.Lin via Gcc-patches wrote: >>>>> Hi! >>>>> >>>>> This patch is to fix the inconsistent behaviors for non-LTO mode >>>>> and LTO mode. As Martin pointed out, currently the function >>>&

PING^3 [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-11-04 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580358.html BR, Kewen >> on 2021/9/28 下午4:16, Kewen.Lin via Gcc-patches wrote: >>> Hi, >>> >>> This patch follows the discussions here[1][2], where Segher >>> point

PING^6 [PATCH v2] combine: Tweak the condition of last_set invalidation

2021-11-04 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572555.html BR, Kewen >>>>> on 2021/6/11 下午9:16, Kewen.Lin via Gcc-patches wrote: >>>>>> Hi Segher, >>>>>> >>>>>> Thanks for the review! &g

Re: [PATCH] vect: Add bias parameter for partial vectorization

2021-11-03 Thread Kewen.Lin via Gcc-patches
Hi Robin, on 2021/11/3 上午4:16, Robin Dapp wrote: > Hi, > > thanks for the helpful comments. The attached v2 addresses the following > points from them: > > - Save the bias in loop_vinfo and set it once in vect_verify_loop_lens. > - Add code to handle the bias in vect_set_loop_controls_directly

Re: [PATCH] vect: Add bias parameter for partial vectorization

2021-10-28 Thread Kewen.Lin via Gcc-patches
Hi Robin, on 2021/10/28 下午10:44, Robin Dapp wrote: > Hi, > > as discussed in > https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582627.html this > introduces a bias parameter for the len_load/len_store ifns as well as > optabs that is meant to distinguish between Power and s390 variants. >

Re: [PATCH] rs6000: Fix ICE of vect cost related to V1TI [PR102767]

2021-10-27 Thread Kewen.Lin via Gcc-patches
on 2021/10/28 上午9:43, David Edelsohn wrote: > On Wed, Oct 27, 2021 at 9:30 PM Kewen.Lin wrote: >> >> Hi David, >> >> Thanks for the review! >> >> on 2021/10/27 下午9:12, David Edelsohn wrote: >>> On Sun, Oct 24, 2021 at 11:04 PM Kewen.Lin wrote: Hi, As PR102767 shows, the commit

Re: [PATCH] rs6000: Fix ICE of vect cost related to V1TI [PR102767]

2021-10-27 Thread Kewen.Lin via Gcc-patches
Hi David, Thanks for the review! on 2021/10/27 下午9:12, David Edelsohn wrote: > On Sun, Oct 24, 2021 at 11:04 PM Kewen.Lin wrote: >> >> Hi, >> >> As PR102767 shows, the commit r12-3482 exposed one ICE in function >> rs6000_builtin_vectorization_cost. We claims V1TI supports movmisalign >> on rs6

Re: [committed] testsuite: Fix up gcc.dg/pr102897.c testcase [PR102897]

2021-10-27 Thread Kewen.Lin via Gcc-patches
Hi Jakub, on 2021/10/27 下午3:51, Jakub Jelinek wrote: > On Tue, Oct 26, 2021 at 11:40:01AM +0800, Kewen.Lin via Gcc-patches wrote: >> gcc/testsuite/ChangeLog: >> >> * gcc.dg/pr102897.c: New test. > > The testcase FAILs on i686-linux due to: > FAIL: gcc.dg/pr10

Re: [PATCH] forwprop: Remove incorrect assertion [PR102897]

2021-10-26 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2021/10/26 下午3:50, Richard Biener wrote: > On Tue, Oct 26, 2021 at 5:40 AM Kewen.Lin wrote: >> >> Hi, >> >> As PR102897 shows, there is one incorrect assertion in function >> simplify_permutation, which is based on the wrong assumption that >> all cases with op2_type == tgt_type are

[PATCH] forwprop: Remove incorrect assertion [PR102897]

2021-10-25 Thread Kewen.Lin via Gcc-patches
Hi, As PR102897 shows, there is one incorrect assertion in function simplify_permutation, which is based on the wrong assumption that all cases with op2_type == tgt_type are handled previously, the proposed fix is to remove this wrong assertion. Bootstrapped and regtested on x86_64-redhat-linux,

[PATCH] rs6000: Fix ICE of vect cost related to V1TI [PR102767]

2021-10-24 Thread Kewen.Lin via Gcc-patches
Hi, As PR102767 shows, the commit r12-3482 exposed one ICE in function rs6000_builtin_vectorization_cost. We claims V1TI supports movmisalign on rs6000 (See define_expand "movmisalign"), so it return true in rs6000_builtin_support_vector_misalignment for misalign 8. Later in the cost querying rs

[PATCH] vect: Don't update inits for simd_lane_access DRs [PR102789]

2021-10-24 Thread Kewen.Lin via Gcc-patches
Hi, As PR102789 shows, when vectorizer does some peelings for alignment in prologue, function vect_update_inits_of_drs would update the inits of some drs. But as the failed case, we shouldn't update the dr for simd_lane_access, it has the fixed-length storage mainly for the main loop, the update

PING^1 [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-10-20 Thread Kewen.Lin via Gcc-patches
Hi, As the discussions and the testing result under the main thread, this patch would be safe. Ping for this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580357.html BR, Kewen on 2021/9/28 下午4:13, Kewen.Lin via Gcc-patches wrote: > Hi, > > As the discussion in

PING^4 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-10-20 Thread Kewen.Lin via Gcc-patches
>>> on 2021/9/1 下午2:55, Kewen.Lin via Gcc-patches wrote: >>>> Hi! >>>> >>>> This patch is to fix the inconsistent behaviors for non-LTO mode >>>> and LTO mode. As Martin pointed out, currently the function >>>> rs6000_can_inl

PING^2 [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-10-20 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580358.html BR, Kewen > on 2021/9/28 下午4:16, Kewen.Lin via Gcc-patches wrote: >> Hi, >> >> This patch follows the discussions here[1][2], where Segher >> pointed out the existing way t

PING^5 [PATCH v2] combine: Tweak the condition of last_set invalidation

2021-10-20 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572555.html BR, Kewen > >>>> on 2021/6/11 下午9:16, Kewen.Lin via Gcc-patches wrote: >>>>> Hi Segher, >>>>> >>>>> Thanks for the review! >>

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-15 Thread Kewen.Lin via Gcc-patches
on 2021/10/14 下午6:56, Kewen.Lin via Gcc-patches wrote: > Hi Hongtao, > > on 2021/10/14 下午3:11, liuhongt wrote: >> Hi Kewen: >> Cound you help to verify if this patch fix those regressions >> for rs6000 port. >> > > The ppc64le run just finished, the

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-14 Thread Kewen.Lin via Gcc-patches
Hi Hongtao, on 2021/10/14 下午3:11, liuhongt wrote: > Hi Kewen: > Cound you help to verify if this patch fix those regressions > for rs6000 port. > The ppc64le run just finished, there are still some regresssions: NA->XPASS: c-c++-common/Wstringop-overflow-2.c -Wc++-compat (test for warning

Re: [PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-13 Thread Kewen.Lin via Gcc-patches
on 2021/10/13 下午2:29, Hongtao Liu via Gcc-patches wrote: > On Wed, Oct 13, 2021 at 11:34 AM Hongtao Liu wrote: >> >> On Tue, Oct 12, 2021 at 11:49 PM Martin Sebor wrote: >>> >>> On 10/11/21 8:31 PM, Hongtao Liu wrote: On Tue, Oct 12, 2021 at 4:08 AM Martin Sebor via Gcc-patches wrote:

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-10-12 Thread Kewen.Lin via Gcc-patches
Hi Bill! on 2021/10/13 上午12:36, Bill Schmidt wrote: > Hi Kewen, > > On 10/11/21 1:30 AM, Kewen.Lin wrote: >> Hi Segher, >> >> Thanks for the comments. >> >> on 2021/10/1 上午6:13, Segher Boessenkool wrote: >>> Hi! >>> >>> On Thu, Sep 30, 2021 at 11:06:50AM +0800, Kewen.Lin wrote: >>> >>> [ huge sni

PING^3 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-10-12 Thread Kewen.Lin via Gcc-patches
>> on 2021/9/1 下午2:55, Kewen.Lin via Gcc-patches wrote: >>> Hi! >>> >>> This patch is to fix the inconsistent behaviors for non-LTO mode >>> and LTO mode. As Martin pointed out, currently the function >>> rs6000_can_inline_p simply makes it inlin

PING^1 [PATCH v2] rs6000: Modify the way for extra penalized cost

2021-10-12 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580358.html BR, Kewen on 2021/9/28 下午4:16, Kewen.Lin via Gcc-patches wrote: > Hi, > > This patch follows the discussions here[1][2], where Segher > pointed out the existing way to guard the extra pena

PING^4 [PATCH v2] combine: Tweak the condition of last_set invalidation

2021-10-12 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572555.html BR, Kewen >>> on 2021/6/11 下午9:16, Kewen.Lin via Gcc-patches wrote: >>>> Hi Segher, >>>> >>>> Thanks for the review! >>>> >>>> on 2021/6/1

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-10-10 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the comments. on 2021/10/1 上午6:13, Segher Boessenkool wrote: > Hi! > > On Thu, Sep 30, 2021 at 11:06:50AM +0800, Kewen.Lin wrote: > > [ huge snip ] > >> Based on the understanding and testing, I think it's safe to adopt this >> patch. >> Do both Peter and you agree the r

[PATCH] rs6000/test: Adjust some cases due to O2 vect [PR102658]

2021-10-10 Thread Kewen.Lin via Gcc-patches
Hi, As PR102658 shows, commit r12-4240 enables vectorization at O2, some cases need to be adjusted accordingly for rs6000 port. - For target specific test cases, this adds -fno-tree-vectorize to retain original test points, otherwise vectorization can make some expected scalar instructions gone o

Re: [PATCH] Adjust testcase for O2 vectorization enabling

2021-10-10 Thread Kewen.Lin via Gcc-patches
Hi Hongtao, on 2021/10/11 上午10:10, liuhongt via Gcc-patches wrote: > libgomp/ChangeLog: > > * testsuite/libgomp.graphite/force-parallel-8.c: Add > -fno-tree-vectorize. > --- > libgomp/testsuite/libgomp.graphite/force-parallel-8.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

[PATCH] testsuite: Add missing comment for some dg-warning

2021-10-09 Thread Kewen.Lin via Gcc-patches
Hi, This patch fixes the typos introduced by commit r12-4240. The dg-warning format looks like: { dg-warning regexp [comment [{ target/xfail selector } [line] ]] } Some dg-warnings such as: { dg-warning "\\\[-Wstringop-overflow" { target { i?86-*-* x86_64-*-* } } } miss the comment field, it

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-09-29 Thread Kewen.Lin via Gcc-patches
Hi Bill, on 2021/9/29 下午7:59, Bill Schmidt wrote: > Hi Kewen, > > On 9/28/21 9:34 PM, Kewen.Lin wrote: >> Hi Bill, >> >> Thanks for your prompt comments! >> >> on 2021/9/29 上午3:24, Bill Schmidt wrote: >>> Hi Kewen, >>> >>> Although I agree that what we do now is tragically bad (and will be fixed

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-09-28 Thread Kewen.Lin via Gcc-patches
Hi Bill, Thanks for your prompt comments! on 2021/9/29 上午3:24, Bill Schmidt wrote: > Hi Kewen, > > Although I agree that what we do now is tragically bad (and will be fixed in > the builtin rewrite), this seems a little too cavalier to remove all checking > during initialization without adding

PING^2 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-09-28 Thread Kewen.Lin via Gcc-patches
on 2021/9/15 下午4:42, Kewen.Lin via Gcc-patches wrote: > Hi! > > Gentle ping this patch: > > https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578552.html > > BR, > Kewen > > on 2021/9/1 下午2:55, Kewen.Lin via Gcc-patches wrote: >> Hi! >> >>

Re: [PATCH] rs6000: Modify the way for extra penalized cost

2021-09-28 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/9/23 上午6:36, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 21, 2021 at 11:24:08AM +0800, Kewen.Lin wrote: >> on 2021/9/18 上午6:01, Segher Boessenkool wrote: >>> On Thu, Sep 16, 2021 at 09:14:15AM +0800, Kewen.Lin wrote: The way with nunits * stmt_cost can get one much exa

[PATCH v2] rs6000: Modify the way for extra penalized cost

2021-09-28 Thread Kewen.Lin via Gcc-patches
Hi, This patch follows the discussions here[1][2], where Segher pointed out the existing way to guard the extra penalized cost for strided/elementwise loads with a magic bound does not scale. The way with nunits * stmt_cost can get one much exaggerated penalized cost, such as: for V16QI on P8, it

[PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-09-28 Thread Kewen.Lin via Gcc-patches
Hi, As the discussion in PR102347, currently builtin_decl is invoked so early, it's when making up the function_decl for builtin functions, at that time the rs6000_builtin_mask could be wrong for those builtins sitting in #pragma/attribute target functions, though it will be updated properly later

Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-21 Thread Kewen.Lin via Gcc-patches
on 2021/9/21 下午5:39, Richard Biener wrote: > On Tue, Sep 21, 2021 at 11:31 AM Martin Jambor wrote: >> >> Hi, >> >> On Tue, Sep 21 2021, Kewen.Lin wrote: >>> on 2021/9/17 下午7:26, Martin Jambor wrote: On Fri, Sep 17 2021, Kewen.Lin wrote: >> [...] > > Sorry that I failed to use 16 bit-f

Re: [PATCH] rs6000: Parameterize some const values for density test

2021-09-21 Thread Kewen.Lin via Gcc-patches
on 2021/9/21 下午8:03, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 21, 2021 at 01:47:19PM +0800, Kewen.Lin wrote: >> on 2021/9/18 上午6:26, Segher Boessenkool wrote: + if (data->nloads > (unsigned int) rs6000_density_load_num_threshold +&& load_pct > (unsigned int) rs6000_densit

Re: [PATCH] ipa-fnsummary: Remove inconsistent bp_pack_value

2021-09-21 Thread Kewen.Lin via Gcc-patches
on 2021/9/21 下午2:16, Richard Biener wrote: > On Tue, Sep 21, 2021 at 4:09 AM Kewen.Lin wrote: >> >> Hi Richi, >> >> Thanks for the review! >> >> on 2021/9/17 下午6:04, Richard Biener wrote: >>> On Fri, Sep 17, 2021 at 12:03 PM Richard Biener >>> wrote: On Fri, Sep 17, 2021 at 11:43 AM Kew

Re: [PATCH v3] ipa-inline: Add target info into fn summary [PR102059]

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Martin, Thanks for the review. on 2021/9/18 下午7:31, Martin Jambor wrote: > Hi, > > On Fri, Sep 17 2021, Segher Boessenkool wrote: >> On Fri, Sep 17, 2021 at 05:42:38PM +0800, Kewen.Lin wrote: >>> Against v2 [2], this v3 addressed Martin's review comments: >>> - Replace HWI auto_vec with uns

Re: [PATCH v3] ipa-inline: Add target info into fn summary [PR102059]

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review! on 2021/9/17 下午10:14, Segher Boessenkool wrote: > On Fri, Sep 17, 2021 at 05:42:38PM +0800, Kewen.Lin wrote: >> Against v2 [2], this v3 addressed Martin's review comments: >> - Replace HWI auto_vec with unsigned int for target_info >> to avoid overkill (als

Re: [PATCH] rs6000: Parameterize some const values for density test

2021-09-20 Thread Kewen.Lin via Gcc-patches
on 2021/9/18 上午6:26, Segher Boessenkool wrote: > Hi! > > On Wed, Sep 15, 2021 at 04:52:49PM +0800, Kewen.Lin wrote: >> This patch follows the discussion here[1], where Segher suggested >> parameterizing those exact magic constants for density heuristics, >> to make it easier to tweak if need. >> >

Re: [PATCH] rs6000: Parameterize some const values for density test

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Bill, Thanks for the review! on 2021/9/18 上午12:27, Bill Schmidt wrote: > Hi Kewen, > > On 9/15/21 3:52 AM, Kewen.Lin wrote: >> Hi, >> >> This patch follows the discussion here[1], where Segher suggested >> parameterizing those exact magic constants for density heuristics, >> to make it easier

Re: [PATCH] rs6000: Modify the way for extra penalized cost

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review! on 2021/9/18 上午6:01, Segher Boessenkool wrote: > Hi! > > On Thu, Sep 16, 2021 at 09:14:15AM +0800, Kewen.Lin wrote: >> The way with nunits * stmt_cost can get one much exaggerated >> penalized cost, such as: for V16QI on P8, it's 16 * 20 = 320, >> that's why we

Re: [PATCH] rs6000: Modify the way for extra penalized cost

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Bill, Thanks for the review! on 2021/9/18 上午12:34, Bill Schmidt wrote: > Hi Kewen, > > On 9/15/21 8:14 PM, Kewen.Lin wrote: >> Hi, >> >> This patch follows the discussion here[1], where Segher pointed >> out the existing way to guard the extra penalized cost for >> strided/elementwise loads w

Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Martin, on 2021/9/17 下午7:26, Martin Jambor wrote: > Hi, > > On Fri, Sep 17 2021, Kewen.Lin wrote: >> on 2021/9/16 下午9:19, Martin Jambor wrote: >>> On Thu, Sep 16 2021, Kewen.Lin wrote: on 2021/9/15 下午8:51, Martin Jambor wrote: > On Wed, Sep 08 2021, Kewen.Lin wrote: >> > >

Re: [PATCH] ipa-fnsummary: Remove inconsistent bp_pack_value

2021-09-20 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for the review! on 2021/9/17 下午6:04, Richard Biener wrote: > On Fri, Sep 17, 2021 at 12:03 PM Richard Biener > wrote: >> >> On Fri, Sep 17, 2021 at 11:43 AM Kewen.Lin wrote: >>> >>> Hi, >>> >>> When changing target_info with bitfield, I happened to find this >>> inconsistent st

Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-17 Thread Kewen.Lin via Gcc-patches
Hi Martin, on 2021/9/16 下午9:19, Martin Jambor wrote: > Hi, > > On Thu, Sep 16 2021, Kewen.Lin wrote: >> Hi Martin, >> >> Thanks for the review comments! >> >> on 2021/9/15 下午8:51, Martin Jambor wrote: >>> Hi, >>> >>> since this is inlining-related, I would somewhat prefer Honza to have a >>> look

[PATCH] ipa-fnsummary: Remove inconsistent bp_pack_value

2021-09-17 Thread Kewen.Lin via Gcc-patches
Hi, When changing target_info with bitfield, I happened to find this inconsistent streaming in and out. We have the streaming in: bp_pack_value (&bp, info->inlinable, 1); bp_pack_value (&bp, false, 1); bp_pack_value (&bp, info->fp_expressions, 1); while the streami

[PATCH v3] ipa-inline: Add target info into fn summary [PR102059]

2021-09-17 Thread Kewen.Lin via Gcc-patches
Hi! Power ISA 2.07 (Power8) introduces transactional memory feature but ISA3.1 (Power10) removes it. It exposes one troublesome issue as PR102059 shows. Users define some function with target pragma cpu=power10 then it calls one function with attribute always_inline which inherits command line o

Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-15 Thread Kewen.Lin via Gcc-patches
Hi Martin, Thanks for the review comments! on 2021/9/15 下午8:51, Martin Jambor wrote: > Hi, > > since this is inlining-related, I would somewhat prefer Honza to have a > look too, but I have the following comments: > > On Wed, Sep 08 2021, Kewen.Lin wrote: >> > > [...] > >> diff --git a/gcc/ip

[PATCH] rs6000: Modify the way for extra penalized cost

2021-09-15 Thread Kewen.Lin via Gcc-patches
Hi, This patch follows the discussion here[1], where Segher pointed out the existing way to guard the extra penalized cost for strided/elementwise loads with a magic bound doesn't scale. The way with nunits * stmt_cost can get one much exaggerated penalized cost, such as: for V16QI on P8, it's 16

[PATCH] rs6000: Parameterize some const values for density test

2021-09-15 Thread Kewen.Lin via Gcc-patches
Hi, This patch follows the discussion here[1], where Segher suggested parameterizing those exact magic constants for density heuristics, to make it easier to tweak if need. Since these heuristics are quite internal, I make these parameters as undocumented and be mainly used by developers. The ch

PING^1 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-09-15 Thread Kewen.Lin via Gcc-patches
Hi! Gentle ping this patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578552.html BR, Kewen on 2021/9/1 下午2:55, Kewen.Lin via Gcc-patches wrote: > Hi! > > This patch is to fix the inconsistent behaviors for non-LTO mode > and LTO mode. As Martin pointed out, c

PING^1 [PATCH] rs6000: Remove useless toc-fusion option

2021-09-15 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578553.html BR, Kewen on 2021/9/1 下午2:56, Kewen.Lin via Gcc-patches wrote: > Hi! > > Option toc-fusion was intended for Power9 toc fusion previously, > but Power9 doesn't support fusion

Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-13 Thread Kewen.Lin via Gcc-patches
Hi Bill, on 2021/9/13 上午12:34, Bill Schmidt wrote: > Hi Kewen, > > I'll leave the continued review of the back-end parts of this to Segher, but > I do have one long-term comment.  The rs6000_builtin_info[code].mask field > that you're relying on is going away as part of the built-in function >

[committed] rs6000: Remove typedef for struct rs6000_cost_data

2021-09-12 Thread Kewen.Lin via Gcc-patches
Hi, This patch follows Segher's suggestion here[1] to get rid of the typedef, it's pre-approved as [1]. Bootstrapped and regtested on powerpc64le-linux-gnu Power9. Pushed to trunk as r12-3468. [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579115.html BR, Kewen - gcc/ChangeL

Re: [PATCH v4] rs6000: Add load density heuristic

2021-09-09 Thread Kewen.Lin via Gcc-patches
on 2021/9/10 上午11:22, Kewen.Lin via Gcc-patches wrote: > Hi Segher and Bill, > > Thanks a lot for your reviews and helps! > > on 2021/9/10 上午1:19, Bill Schmidt wrote: >> On 9/9/21 11:11 AM, Segher Boessenkool wrote: >>> Hi! >>> >>> On Wed, S

Re: [PATCH v4] rs6000: Add load density heuristic

2021-09-09 Thread Kewen.Lin via Gcc-patches
Hi Segher and Bill, Thanks a lot for your reviews and helps! on 2021/9/10 上午1:19, Bill Schmidt wrote: > On 9/9/21 11:11 AM, Segher Boessenkool wrote: >> Hi! >> >> On Wed, Sep 08, 2021 at 02:57:14PM +0800, Kewen.Lin wrote: > +  /* If we have strided or elementwise loads into a vector, it's

Re: [PATCH v4] rs6000: Add load density heuristic

2021-09-08 Thread Kewen.Lin via Gcc-patches
on 2021/9/8 下午2:57, Kewen.Lin via Gcc-patches wrote: > Hi Bill, > > Thanks for the review comments! > > on 2021/9/3 下午11:57, Bill Schmidt wrote: >> Hi Kewen, >> >> Sorry that we lost track of this patch!  The heuristic approach looks good.  >> It is limite

[PATCH v2] ipa-inline: Add target info into fn summary [PR102059]

2021-09-08 Thread Kewen.Lin via Gcc-patches
Hi! Power ISA 2.07 (Power8) introduces transactional memory feature but ISA3.1 (Power10) removes it. It exposes one troublesome issue as PR102059 shows. Users define some function with target pragma cpu=power10 then it calls one function with attribute always_inline which inherits command line o

PING^3 [PATCH v2] combine: Tweak the condition of last_set invalidation

2021-09-08 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572555.html BR, Kewen on 2021/7/15 上午10:00, Kewen.Lin via Gcc-patches wrote: > Hi, > > Gentle ping this: > > https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572555.html > > BR, > Kewen

Re: [PATCH v2] rs6000: Add load density heuristic

2021-09-08 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the comments! on 2021/9/7 上午7:43, Segher Boessenkool wrote: > Hi! > > On Wed, Jul 28, 2021 at 10:59:50AM +0800, Kewen.Lin wrote: +/* As a visitor function for each statement cost entry handled in + function add_stmt_cost, gather some information and update its >

[PATCH v4] rs6000: Add load density heuristic

2021-09-07 Thread Kewen.Lin via Gcc-patches
Hi Bill, Thanks for the review comments! on 2021/9/3 下午11:57, Bill Schmidt wrote: > Hi Kewen, > > Sorry that we lost track of this patch!  The heuristic approach looks good.  > It is limited in scope and won't kick in often, and the case you're trying to > account for is important. > > At the

Re: [RFC/PATCH] ipa-inline: Add target info into fn summary [PR102059]

2021-09-02 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the comments! on 2021/9/3 上午1:44, Segher Boessenkool wrote: > Hi! > > On Wed, Sep 01, 2021 at 03:02:22PM +0800, Kewen.Lin wrote: >> It introduces two target hooks need_ipa_fn_target_info and >> update_ipa_fn_target_info. The former allows target to do >> some previous chec

Re: [RFC/PATCH] ipa-inline: Add target info into fn summary [PR102059]

2021-09-02 Thread Kewen.Lin via Gcc-patches
on 2021/9/2 下午7:51, Richard Biener wrote: > On Thu, Sep 2, 2021 at 1:13 PM Kewen.Lin wrote: >> >> Hi Richi, >> >> Thanks for the comments! >> >> on 2021/9/2 下午5:25, Richard Biener wrote: >>> On Wed, Sep 1, 2021 at 9:02 AM Kewen.Lin wrote: Hi! Power ISA 2.07 (Power8) introduces

Re: [RFC/PATCH] ipa-inline: Add target info into fn summary [PR102059]

2021-09-02 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for the comments! on 2021/9/2 下午5:25, Richard Biener wrote: > On Wed, Sep 1, 2021 at 9:02 AM Kewen.Lin wrote: >> >> Hi! >> >> Power ISA 2.07 (Power8) introduces transactional memory feature >> but ISA3.1 (Power10) removes it. It exposes one troublesome >> issue as PR102059 show

[RFC/PATCH] ipa-inline: Add target info into fn summary [PR102059]

2021-09-01 Thread Kewen.Lin via Gcc-patches
Hi! Power ISA 2.07 (Power8) introduces transactional memory feature but ISA3.1 (Power10) removes it. It exposes one troublesome issue as PR102059 shows. Users define some function with target pragma cpu=power10 then it calls one function with attribute always_inline which inherits command line o

[PATCH] rs6000: Remove useless toc-fusion option

2021-08-31 Thread Kewen.Lin via Gcc-patches
Hi! Option toc-fusion was intended for Power9 toc fusion previously, but Power9 doesn't support fusion at all eventually, this patch is to remove this useless option. Is it ok for trunk? BR, Kewen - gcc/ChangeLog: * config/rs6000/rs6000.opt (-mtoc-fusion): Remove. --- gcc/config/rs

[PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-08-31 Thread Kewen.Lin via Gcc-patches
Hi! This patch is to fix the inconsistent behaviors for non-LTO mode and LTO mode. As Martin pointed out, currently the function rs6000_can_inline_p simply makes it inlinable if callee_tree is NULL, but it's wrong, we should use the command line options from target_option_default_node as default.

Re: [PATCH] rs6000: Add missing unsigned info for some P10 bifs

2021-08-29 Thread Kewen.Lin via Gcc-patches
on 2021/8/11 下午1:44, Kewen.Lin via Gcc-patches wrote: > Hi, > > This patch is to make prototypes of some Power10 built-in > functions consistent with what's in the documentation, as > well as the vector version. Otherwise, useless conversions > can be generated in gimple

Re: [PATCH, rs6000] Disable gimple fold for float or double vec_minmax when fast-math is not set

2021-08-25 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2021/8/25 下午3:06, HAO CHEN GUI via Gcc-patches wrote: > Hi, > >     I refined the patch according to Bill's advice. I pasted the ChangeLog > and diff file here. If it doesn't work, please let me know. Thanks. > > 2021-08-25 Haochen Gui > > gcc/ IIUC, this patch is for PR93127,

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-24 Thread Kewen.Lin via Gcc-patches
on 2021/8/25 上午6:14, Segher Boessenkool wrote: > Hi! > > On Fri, Aug 13, 2021 at 10:34:46AM +0800, Kewen.Lin wrote: >> on 2021/8/12 下午11:10, Segher Boessenkool wrote: + && VECTOR_UNIT_ALTIVEC_OR_VSX_P (in_vmode)) +{ + machine_mode exp_mode = DImode; + machine

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-24 Thread Kewen.Lin via Gcc-patches
on 2021/8/25 上午5:56, Segher Boessenkool wrote: > On Fri, Aug 13, 2021 at 11:18:46AM +0800, Kewen.Lin wrote: >> on 2021/8/12 下午11:51, Segher Boessenkool wrote: >>> It is a bad idea to initialise things unnecessary: it hinders many >>> optimisations, but much more importantly, it silences warnings wi

Re: [PATCH v2] rs6000: Add vec_unpacku_{hi,lo}_v4si

2021-08-24 Thread Kewen.Lin via Gcc-patches
on 2021/8/24 下午9:02, Segher Boessenkool wrote: > Hi Ke Wen, > > On Mon, Aug 09, 2021 at 10:53:00AM +0800, Kewen.Lin wrote: >> on 2021/8/6 下午9:10, Bill Schmidt wrote: >>> On 8/4/21 9:06 PM, Kewen.Lin wrote: The existing vec_unpacku_{hi,lo} supports emulated unsigned unpacking for short an

Re: [PATCH][v2] Remove --param vect-inner-loop-cost-factor

2021-08-23 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2021/8/23 下午10:33, Richard Biener via Gcc-patches wrote: > This removes --param vect-inner-loop-cost-factor in favor of looking > at the estimated number of iterations of the inner loop > when available and otherwise just assumes a single inner > iteration which is conservative on the

Re: [PATCH] more warning code refactoring

2021-08-19 Thread Kewen.Lin via Gcc-patches
Hi Martin, on 2021/8/20 上午12:30, Martin Sebor wrote: > On 8/19/21 9:03 AM, Martin Sebor wrote: >> On 8/18/21 11:56 PM, Kewen.Lin wrote: >>> Hi David, >>> >>> on 2021/8/19 上午11:26, David Edelsohn via Gcc-patches wrote: Hi, Martin A few PowerPC-specific testcases started failing yeste

Re: [PATCH] more warning code refactoring

2021-08-18 Thread Kewen.Lin via Gcc-patches
Hi David, on 2021/8/19 上午11:26, David Edelsohn via Gcc-patches wrote: > Hi, Martin > > A few PowerPC-specific testcases started failing yesterday on AIX with > a strange failure mode: the compiler runs out of memory. As you may > expect from telling you this in an email reply to your patch, I ha

Re: [PATCH] vect: Add extraction cost for slp reduc

2021-08-16 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for the comments! on 2021/8/16 下午2:49, Richard Biener wrote: > On Mon, Aug 16, 2021 at 8:03 AM Kewen.Lin wrote: >> >> Hi, >> >> IIUC, the function vectorizable_bb_reduc_epilogue missed to >> consider the cost to extract the final value from the vector >> for reduc operations. T

[PATCH] vect: Add extraction cost for slp reduc

2021-08-15 Thread Kewen.Lin via Gcc-patches
Hi, IIUC, the function vectorizable_bb_reduc_epilogue missed to consider the cost to extract the final value from the vector for reduc operations. This patch is to add one time of vec_to_scalar cost for extracting. Bootstrapped & regtested on powerpc64le-linux-gnu P9. The testing on x86_64 and a

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-12 Thread Kewen.Lin via Gcc-patches
on 2021/8/12 下午11:51, Segher Boessenkool wrote: > On Thu, Aug 12, 2021 at 10:10:10AM +0800, Kewen.Lin wrote: >>> + enum rs6000_builtins vname = RS6000_BUILTIN_COUNT; >>> >>> Using this as a flag value looks unnecessary. Is this just being done to >>> silence a warning? >> >> Good question!

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-12 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review! on 2021/8/12 下午11:10, Segher Boessenkool wrote: > Hi! > > On Wed, Aug 11, 2021 at 02:56:11PM +0800, Kewen.Lin wrote: >> * config/rs6000/rs6000.c (rs6000_builtin_md_vectorized_function): Add >> support for some built-in functions vectorized on Power10.

Re: [PATCH] rs6000: Add missing unsigned info for some P10 bifs

2021-08-12 Thread Kewen.Lin via Gcc-patches
Hi Bill, on 2021/8/12 上午12:24, Bill Schmidt wrote: > Hi Kewen, > > On 8/11/21 12:44 AM, Kewen.Lin wrote: >> Hi, >> >> This patch is to make prototypes of some Power10 built-in >> functions consistent with what's in the documentation, as >> well as the vector version.  Otherwise, useless conversio

Re: [PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-11 Thread Kewen.Lin via Gcc-patches
Hi Bill, Thanks for your prompt review! on 2021/8/12 上午12:34, Bill Schmidt wrote: > Hi Kewen, > > FWIW, it's easier on reviewers if you include the patch inline instead of as > an attachment. > > On 8/11/21 1:56 AM, Kewen.Lin wrote: >> Hi, >> >> This patch is to add the support to make vectori

[PATCH] rs6000: Make some BIFs vectorized on P10

2021-08-10 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to add the support to make vectorizer able to vectorize scalar version of some built-in functions with its corresponding vector version with Power10 support. Bootstrapped & regtested on powerpc64le-linux-gnu {P9,P10} and powerpc64-linux-gnu P8. Is it ok for trunk? BR, Kewen --

<    2   3   4   5   6   7   8   9   10   11   >