This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: scheduling vs variable arrays (revised)


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]