This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Change to readonly conflict handling
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Subject: Re: Change to readonly conflict handling
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Mon, 18 Sep 2000 13:50:15 -0700
- CC: gcc at gcc dot gnu dot org
- References: <10009180030.AA12175@vlsi1.ultra.nyu.edu>
> Date: Sun, 17 Sep 00 20:30:50 EDT
> From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
> Cc: gcc@gcc.gnu.org
>
> This code is actually not valid C; neither of the two assignments are
> valid, because they change p->a and q->a which are 'const'.
>
> Yes, I know, but I don't think there's any way to get it from valid C. This
> was meant to be as close I could get the actual case, which was from Ada.
>
> Actually, what I get is _both_ words of *p and *q being stored with
> /u. On powerpc (so the fields are SImode):
>
> Right, I get that too. I even think I see why, though it is a bug.
>
>
> (insn 16 15 19 (set (mem/s/u:DI (reg/v:SI 82) 0)
> (reg:DI 86)) -1 (nil)
> (nil))
>
> (insn 19 16 20 (set (reg:DI 87)
> (mem/s:DI (reg/v:SI 82) 0)) -1 (nil)
> (nil))
>
> But *this* is key: it's being stored *with* the "/u", but loaded without.
> That will cause these two loads to be marked non-conflicting, which may
> have them scheduled in the wrong order (how I ran into the bug).
Yes, but see: it's not the field itself that is being stored or read
readonly, it's the whole structure. Yet the structure is not readonly.
> Oh, I see why they are both readonly. The readonly_fields_p logic sets
> the whole thing readonly and we don't ever turn it off once the actual
> target gets it set. Perhaps a bug, but I'm not sure how else to do this.
I'd just decide that RTX_UNCHANGING_P is not the construct that should
be used to represent constant fields.
--
- Geoffrey Keating <geoffk@cygnus.com>