Re: gcc moving memory reference across call

2008-10-14 Thread Andrew Haley
Daniel Berlin wrote: >> It's a field in the class$ structure. class$ is initialized by creating a >> CONSTRUCTOR tree and calling CONSTRUCTOR_APPEND_ELT for each field. The >> DECL_INITIAL of class$ points to the CONSTRUCTOR tree. >> >> _CD_pp is an array of void*. These are initialized by DECL_

Re: gcc moving memory reference across call

2008-10-14 Thread Andrew Haley
Daniel Berlin wrote: >> It's a field in the class$ structure. class$ is initialized by creating a >> CONSTRUCTOR tree and calling CONSTRUCTOR_APPEND_ELT for each field. The >> DECL_INITIAL of class$ points to the CONSTRUCTOR tree. >> >> _CD_pp is an array of void*. These are initialized by DECL_

Re: gcc moving memory reference across call

2008-10-13 Thread Daniel Berlin
> > It's a field in the class$ structure. class$ is initialized by creating a > CONSTRUCTOR tree and calling CONSTRUCTOR_APPEND_ELT for each field. The > DECL_INITIAL of class$ points to the CONSTRUCTOR tree. > > _CD_pp is an array of void*. These are initialized by DECL_INITIAL too. > > InitCla

Re: gcc moving memory reference across call

2008-10-13 Thread Andrew Haley
Richard Guenther wrote: > On Mon, Oct 13, 2008 at 4:38 PM, Andrew Haley <[EMAIL PROTECTED]> wrote: >> Andrew Pinski wrote: >>> On Fri, Oct 10, 2008 at 11:14 AM, Andrew Haley <[EMAIL PROTECTED]> wrote: Richard Guenther wrote: > On Fri, Oct 10, 2008 at 7:55 PM, Andrew Haley <[EMAIL PROTECTED

Re: gcc moving memory reference across call

2008-10-13 Thread Richard Guenther
On Mon, Oct 13, 2008 at 4:38 PM, Andrew Haley <[EMAIL PROTECTED]> wrote: > Andrew Pinski wrote: >> On Fri, Oct 10, 2008 at 11:14 AM, Andrew Haley <[EMAIL PROTECTED]> wrote: >>> Richard Guenther wrote: On Fri, Oct 10, 2008 at 7:55 PM, Andrew Haley <[EMAIL PROTECTED]> wrote: > I have some br

Re: gcc moving memory reference across call

2008-10-13 Thread Andrew Haley
Andrew Pinski wrote: > On Fri, Oct 10, 2008 at 11:14 AM, Andrew Haley <[EMAIL PROTECTED]> wrote: >> Richard Guenther wrote: >>> On Fri, Oct 10, 2008 at 7:55 PM, Andrew Haley <[EMAIL PROTECTED]> wrote: I have some broken code, compiled from Java source. It looks like: D.8

Re: gcc moving memory reference across call

2008-10-11 Thread Andrew Haley
Andrew Pinski wrote: > On Fri, Oct 10, 2008 at 11:14 AM, Andrew Haley <[EMAIL PROTECTED]> wrote: >> Richard Guenther wrote: >>> On Fri, Oct 10, 2008 at 7:55 PM, Andrew Haley <[EMAIL PROTECTED]> wrote: I have some broken code, compiled from Java source. It looks like: D.8

Re: gcc moving memory reference across call

2008-10-10 Thread Ian Lance Taylor
Andrew Haley <[EMAIL PROTECTED]> writes: > In the RTL code it moves the mem ref, not just the address: > > (call (mem:QI (symbol_ref:DI ("_Jv_InitClass") [flags 0x41] > > (set (reg/f:DI 95 [ #ref#8#1 ]) > (mem/s/u/f/j:DI (const:DI (plus:DI (symbol_ref:DI > ("_CD_java_text_Collator") >

Re: gcc moving memory reference across call

2008-10-10 Thread Richard Henderson
Andrew Haley wrote: D.843 = &java.text.Collator.class$$; D.845 = &_CD_java_text_Collator; _Jv_InitClass (D.843); This is always a valid transformation. i.e. the memory reference is moved to before the call to _Jv_InitClass. There is no memory reference in the above case, it seems jus

Re: gcc moving memory reference across call

2008-10-10 Thread Andrew Pinski
On Fri, Oct 10, 2008 at 11:14 AM, Andrew Haley <[EMAIL PROTECTED]> wrote: > Richard Guenther wrote: >> On Fri, Oct 10, 2008 at 7:55 PM, Andrew Haley <[EMAIL PROTECTED]> wrote: >>> I have some broken code, compiled from Java source. >>> >>> It looks like: >>> >>>D.843 = &java.text.Collator.class

Re: gcc moving memory reference across call

2008-10-10 Thread Andrew Haley
Richard Guenther wrote: > On Fri, Oct 10, 2008 at 7:55 PM, Andrew Haley <[EMAIL PROTECTED]> wrote: >> I have some broken code, compiled from Java source. >> >> It looks like: >> >>D.843 = &java.text.Collator.class$$; >>_Jv_InitClass (D.843); >>D.845 = &_CD_java_text_Collator; >> >> is b

Re: gcc moving memory reference across call

2008-10-10 Thread Richard Guenther
On Fri, Oct 10, 2008 at 7:55 PM, Andrew Haley <[EMAIL PROTECTED]> wrote: > I have some broken code, compiled from Java source. > > It looks like: > >D.843 = &java.text.Collator.class$$; >_Jv_InitClass (D.843); >D.845 = &_CD_java_text_Collator; > > is being turned into: > >D.843 = &j

gcc moving memory reference across call

2008-10-10 Thread Andrew Haley
I have some broken code, compiled from Java source. It looks like: D.843 = &java.text.Collator.class$$; _Jv_InitClass (D.843); D.845 = &_CD_java_text_Collator; is being turned into: D.843 = &java.text.Collator.class$$; D.845 = &_CD_java_text_Collator; _Jv_InitClass (D.84