public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Question on insn scheduling and SP
@ 2002-10-22  8:45 Richard Kenner
  2002-10-22 11:25 ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Kenner @ 2002-10-22  8:45 UTC (permalink / raw)
  To: rth; +Cc: dalej, gcc

    Because they *don't* conflict with stack_pointer_rtx.
    Do read the thread Dale indicated.

I did, but some things aren't clear, at least in the comments that
were added.  What was added is a (clobber (mem)).  It's true that the
address was stack_pointer_rtx, but nothing in the comments suggest
that the form of the address is relevant.  Instead, they imply that
it was the mere addition of the CLOBBER that was sufficient.

Am I missing something?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Question on insn scheduling and SP
  2002-10-22  8:45 Question on insn scheduling and SP Richard Kenner
@ 2002-10-22 11:25 ` Richard Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2002-10-22 11:25 UTC (permalink / raw)
  To: Richard Kenner; +Cc: dalej, gcc

On Tue, Oct 22, 2002 at 06:36:51AM -0400, Richard Kenner wrote:
> I did, but some things aren't clear, at least in the comments that
> were added.  What was added is a (clobber (mem)).  It's true that the
> address was stack_pointer_rtx, but nothing in the comments suggest
> that the form of the address is relevant.  Instead, they imply that
> it was the mere addition of the CLOBBER that was sufficient.
> 
> Am I missing something?

*Two* clobbers are necessary.

	(clobber (mem:BLK (scratch)))
	(clobber (mem:BLK stack_pointer_rtx))

The first has the magic form that conflicts with all memory,
the second contains a reference to the stack pointer.  Thus
the stack pointer adjustment depends on the second clobber,
the second clobber depends on the first clobber, and the
first clobber depends on all memory references.


r~

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Question on insn scheduling and SP
  2002-10-22 11:36 Richard Kenner
@ 2002-10-22 12:30 ` Richard Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2002-10-22 12:30 UTC (permalink / raw)
  To: Richard Kenner; +Cc: dalej, gcc

On Tue, Oct 22, 2002 at 01:24:33PM -0400, Richard Kenner wrote:
>     *Two* clobbers are necessary.
> 
> 	(clobber (mem:BLK (scratch)))
> 	(clobber (mem:BLK stack_pointer_rtx))
> 
>     The first has the magic form that conflicts with all memory,
>     the second contains a reference to the stack pointer.  Thus
>     the stack pointer adjustment depends on the second clobber,
>     the second clobber depends on the first clobber, and the
>     first clobber depends on all memory references.
> 
> Well if that's what's going on, why not keep it simpler and have the
> first clobber and then
> 	(use (stack_pointer_rtx))

Because the USE won't conflict with the first clobber.

And if you put them in a PARALLEL, then we're not using
the canonical "bare clobber" that is recognized in a
target-independent manner.


r~

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Question on insn scheduling and SP
@ 2002-10-22 11:36 Richard Kenner
  2002-10-22 12:30 ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Kenner @ 2002-10-22 11:36 UTC (permalink / raw)
  To: rth; +Cc: dalej, gcc

    *Two* clobbers are necessary.

	(clobber (mem:BLK (scratch)))
	(clobber (mem:BLK stack_pointer_rtx))

    The first has the magic form that conflicts with all memory,
    the second contains a reference to the stack pointer.  Thus
    the stack pointer adjustment depends on the second clobber,
    the second clobber depends on the first clobber, and the
    first clobber depends on all memory references.

Well if that's what's going on, why not keep it simpler and have the
first clobber and then
	(use (stack_pointer_rtx))

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Question on insn scheduling and SP
  2002-10-21 23:15 Richard Kenner
@ 2002-10-22  3:50 ` Richard Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2002-10-22  3:50 UTC (permalink / raw)
  To: Richard Kenner; +Cc: dalej, gcc

On Mon, Oct 21, 2002 at 09:02:49PM -0400, Richard Kenner wrote:
> But there is already a reference to MEM in the case I'm looking at and
> I don't see the place in sched where it says that MEMs conflict with
> stack_pointer_rtx.

Because they *don't* conflict with stack_pointer_rtx.
Do read the thread Dale indicated.


r~

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Question on insn scheduling and SP
@ 2002-10-21 23:15 Richard Kenner
  2002-10-22  3:50 ` Richard Henderson
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Kenner @ 2002-10-21 23:15 UTC (permalink / raw)
  To: dalej; +Cc: gcc

    I fixed it here:

    > http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00838.html

    See also followups, I didn't get it right the first time:(

But there is already a reference to MEM in the case I'm looking at and
I don't see the place in sched where it says that MEMs conflict with
stack_pointer_rtx.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Question on insn scheduling and SP
  2002-10-21 18:17 Richard Kenner
@ 2002-10-21 18:41 ` Dale Johannesen
  0 siblings, 0 replies; 8+ messages in thread
From: Dale Johannesen @ 2002-10-21 18:41 UTC (permalink / raw)
  To: Richard Kenner; +Cc: Dale Johannesen, gcc


On Monday, October 21, 2002, at 04:23  PM, Richard Kenner wrote:

> I can find no code to prevent an adjustment of the stack pointer (such 
> as
> when leaving a block containing variables allocated on the stack) wfrom
> being moved in front of the references to that memory.  Am I missing 
> something?
>
> If not, how can this be fixed?

I fixed it here:

> http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00838.html

See also followups, I didn't get it right the first time:(

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Question on insn scheduling and SP
@ 2002-10-21 18:17 Richard Kenner
  2002-10-21 18:41 ` Dale Johannesen
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Kenner @ 2002-10-21 18:17 UTC (permalink / raw)
  To: gcc

I can find no code to prevent an adjustment of the stack pointer (such as
when leaving a block containing variables allocated on the stack) wfrom
being moved in front of the references to that memory.  Am I missing something?

If not, how can this be fixed?

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-10-22 18:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-22  8:45 Question on insn scheduling and SP Richard Kenner
2002-10-22 11:25 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2002-10-22 11:36 Richard Kenner
2002-10-22 12:30 ` Richard Henderson
2002-10-21 23:15 Richard Kenner
2002-10-22  3:50 ` Richard Henderson
2002-10-21 18:17 Richard Kenner
2002-10-21 18:41 ` Dale Johannesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).