Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Peter Bergner via Gcc-patches
On 12/1/21 1:07 PM, Richard Biener wrote: > On December 1, 2021 6:42:21 PM GMT+01:00, Peter Bergner > wrote: >> On 12/1/21 3:01 AM, Richard Biener wrote: >>> Given all this I suggest to exempt OPAQUE_TYPE from is_var_need_auto_init >>> instead of fixing up things at expansion time. >> >> The

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Richard Biener via Gcc-patches
On December 1, 2021 6:42:21 PM GMT+01:00, Peter Bergner wrote: >On 12/1/21 3:01 AM, Richard Biener wrote: >> Given all this I suggest to exempt OPAQUE_TYPE from is_var_need_auto_init >> instead of fixing up things at expansion time. > >The following fixes the ICE. The bootstrap/regtesting is

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Peter Bergner via Gcc-patches
On 12/1/21 3:01 AM, Richard Biener wrote: > Given all this I suggest to exempt OPAQUE_TYPE from is_var_need_auto_init > instead of fixing up things at expansion time. The following fixes the ICE. The bootstrap/regtesting is still running though. Peter diff --git a/gcc/gimplify.c

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Peter Bergner via Gcc-patches
On 12/1/21 9:06 AM, Qing Zhao wrote: >> On Dec 1, 2021, at 3:01 AM, Richard Biener >> wrote: >> Given all this I suggest to exempt OPAQUE_TYPE from is_var_need_auto_init >> instead of fixing up things at expansion time. > > Agreed. > > So, Peter, will you update the routine

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Qing Zhao via Gcc-patches
> On Dec 1, 2021, at 3:01 AM, Richard Biener wrote: > > On Tue, Nov 30, 2021 at 11:35 PM Peter Bergner wrote: >> >> On 11/30/21 2:44 PM, Qing Zhao via Gcc-patches wrote: >>> Sorry for the confusing… >>> My major question is: >>> >>> for a variable of type __vector_pair, could it be in a

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-12-01 Thread Richard Biener via Gcc-patches
On Tue, Nov 30, 2021 at 11:35 PM Peter Bergner wrote: > > On 11/30/21 2:44 PM, Qing Zhao via Gcc-patches wrote: > > Sorry for the confusing… > > My major question is: > > > > for a variable of type __vector_pair, could it be in a register? > > Yes. To be pedantic, it will live in a vector

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Peter Bergner via Gcc-patches
On 11/30/21 2:44 PM, Qing Zhao via Gcc-patches wrote: > Sorry for the confusing… > My major question is: > > for a variable of type __vector_pair, could it be in a register? Yes. To be pedantic, it will live in a vector register pair. > If it could be in a register, can we initialize this

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Qing Zhao via Gcc-patches
Sorry for the confusing… My major question is: for a variable of type __vector_pair, could it be in a register? If it could be in a register, can we initialize this register with some constant value? Qing > On Nov 30, 2021, at 2:07 PM, Peter Bergner wrote: > > On 11/30/21 1:50 PM, Qing

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Peter Bergner via Gcc-patches
On 11/30/21 1:50 PM, Qing Zhao via Gcc-patches wrote: >> void >> bar (__vector_pair *dst, __vector_pair *src) >> { >> __vector_pair pair; >> pair = *src; >> ... >> } > > However, even with the above, the memory pointed by “src” still need to > be initialized somewhere. How to provide the

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Qing Zhao via Gcc-patches
> On Nov 30, 2021, at 12:08 PM, Peter Bergner wrote: > > On 11/30/21 11:51 AM, Qing Zhao wrote: >> So, looks like that the variable with OPAQUE_TYPE cannot be all explicitly >> initialized even at source code level. >> >> The only way to initialize such variable (only __vector_quad, not for

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Peter Bergner via Gcc-patches
On 11/30/21 11:51 AM, Qing Zhao wrote: > So, looks like that the variable with OPAQUE_TYPE cannot be all explicitly > initialized even at source code level. > > The only way to initialize such variable (only __vector_quad, not for > __vector_pairs) at source code level is through call to >

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Qing Zhao via Gcc-patches
> On Nov 30, 2021, at 2:37 AM, Richard Biener > wrote: > > On Mon, Nov 29, 2021 at 11:56 PM Qing Zhao wrote: >> >> Peter, >> >> Thanks a lot for the patch. >> >> Richard, how do you think of the patch? >> >> (The major concern for me is: >> >>With the current patch proposed by

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Qing Zhao via Gcc-patches
> On Nov 30, 2021, at 9:14 AM, Peter Bergner wrote: > > On 11/30/21 2:37 AM, Richard Biener wrote: >> On Mon, Nov 29, 2021 at 11:56 PM Qing Zhao wrote: >> I think that's inconsistent indeed. Peter, what are "opaque" >> registers? rs6000-modes.def suggests >> that there's __vector_pair and

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Peter Bergner via Gcc-patches
On 11/30/21 2:37 AM, Richard Biener wrote: > On Mon, Nov 29, 2021 at 11:56 PM Qing Zhao wrote: > I think that's inconsistent indeed. Peter, what are "opaque" > registers? rs6000-modes.def suggests > that there's __vector_pair and __vector_quad, what's the GIMPLE types > for those? It seems

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-30 Thread Richard Biener via Gcc-patches
On Mon, Nov 29, 2021 at 11:56 PM Qing Zhao wrote: > > Peter, > > Thanks a lot for the patch. > > Richard, how do you think of the patch? > > (The major concern for me is: > > With the current patch proposed by Peter, we will generate the call > to .DEFERRED_INIT for a variable with

Re: [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-29 Thread Qing Zhao via Gcc-patches
Peter, Thanks a lot for the patch. Richard, how do you think of the patch? (The major concern for me is: With the current patch proposed by Peter, we will generate the call to .DEFERRED_INIT for a variable with OPAQUE_TYPE during gimplification phase, However, if this

[PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]

2021-11-29 Thread Peter Bergner via Gcc-patches
Sorry for dropping the ball on testing the patch from the bugzilla! The following patch fixes the ICE reported in the bugzilla on the pre-existing gcc testsuite test case, bootstraps and shows no testsuite regressions on powerpc64le-linux. Ok for trunk? Peter For -ftrivial-auto-var-init=*,