This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: scheduling vs variable arrays (revised)
- From: Richard Henderson <rth at redhat dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Aug 2002 18:16:37 -0700
- Subject: Re: Patch: scheduling vs variable arrays (revised)
- References: <7C7656FD-AE48-11D6-B3C0-003065C86F94@apple.com>
On Mon, Aug 12, 2002 at 04:08:59PM -0700, Dale Johannesen wrote:
> After reading the posts by Richard Henderson and Geoff Keating I'm quite
> confused as to whether the clobber should use SCRATCH or reg_stack_pointer.
> Both ways bootstrap for me, so let me know. (but I am unable to try Ada).
Thinking about the issue that DJE raised, and the fact that
we don't have a generic pattern for tying stack deallocations,
I wonder if emitting _two_ clobbers would work. I.e.
(mem:blk (scratch))
(mem:blk (stack-pointer))
The first matches /u memory, which could conceivably be created
on the stack. I can't do this in C,
z.c:8: error: variable-sized object may not be initialized
but I do believe this is possible in Ada. The second does two
things: first, it is a use of the stack pointer, so that the
subsequent set of the stack pointer depends on this insn, and
two, it is a memory clobber, so it depends on the first insn.
So we've created a method by which the stack pointer set
depends on the first insn, which prevents the badness from
occurring in the opposite way as you encountered.
Assuming this idea tests out ok, patch approved with that change.
r~