public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* alpha haifa regression
@ 1997-09-28 22:41 Richard Henderson
  1997-09-28 23:19 ` Jeffrey A Law
  1997-09-29 13:24 ` Jim Wilson
  0 siblings, 2 replies; 17+ messages in thread
From: Richard Henderson @ 1997-09-28 22:41 UTC (permalink / raw)
  To: egcs

With the haifa scheduler, alpha fails 920908-1 with -O2.

What happens is, the insn that loads from the va_list gets moved
before the stores from the register variables.  It does this
because alias decides that a variable struct memory cannot alias
a non-variable non-struct memory.

It seems a bit hoaky to me, but then the C alias rules are a bit
perverse, so I'll assume this is correct.

The solution then, since we don't want to slow down normal code
where we _can_ make these assumptions, is to emit blockage after
dumping the varargs regs to memory.  


r~


Index: alpha.h
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/alpha/alpha.h,v
retrieving revision 1.3
diff -u -p -d -r1.3 alpha.h
--- alpha.h	1997/09/02 19:37:05	1.3
+++ alpha.h	1997/09/29 05:38:13
@@ -1052,6 +1052,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, 
 		      plus_constant (virtual_incoming_args_rtx,		\
 				     (CUM) * UNITS_PER_WORD)),		\
 	     6 - (CUM), (6 - (CUM)) * UNITS_PER_WORD);			\
+	   emit_insn (gen_blockage ());					\
 	 }								\
       PRETEND_SIZE = 12 * UNITS_PER_WORD;				\
     }									\

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: alpha haifa regression
@ 1997-10-08  4:30 meissner
  0 siblings, 0 replies; 17+ messages in thread
From: meissner @ 1997-10-08  4:30 UTC (permalink / raw)
  To: amylaar, law; +Cc: egcs, rth, wilson

| For __builtin_saveregs, we are talking about a stack slot, not a
| designated varargs flushback area.
| And in front of va_start, any C code might be placed.  Hence, we may not
| make any assumptions that only the prologue is in front.

That is not correct.  Expr.c has the following code in it to guarantee that
__builtin_saveregs is executed first (assuming there is some sort of blockage
in EXPAND_BUILTIN_SAVEREGS to preventt he scheduler from moving things around):

	/* Put the sequence after the NOTE that starts the function.
	   If this is inside a SEQUENCE, make the outer-level insn
	   chain current, so the code is placed at the start of the
	   function.  */
	push_topmost_sequence ();
	emit_insns_before (seq, NEXT_INSN (get_insns ()));
	pop_topmost_sequence ();
	return temp;
 

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

end of thread, other threads:[~1997-10-08  4:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-28 22:41 alpha haifa regression Richard Henderson
1997-09-28 23:19 ` Jeffrey A Law
1997-09-29 13:24 ` Jim Wilson
1997-09-29 13:27   ` Richard Henderson
1997-09-29 15:00     ` Jim Wilson
1997-09-29 15:14       ` Jeffrey A Law
1997-10-07 23:14         ` Joern Rennecke
1997-10-07 22:59           ` Jeffrey A Law
1997-10-07 23:14             ` Joern Rennecke
1997-10-07 17:21               ` Jeffrey A Law
1997-10-07 23:14                 ` Joern Rennecke
1997-10-07 23:14                   ` Jeffrey A Law
1997-10-07 15:21                     ` Joern Rennecke
1997-10-07 17:21                       ` Jeffrey A Law
1997-09-29 13:30   ` Jeffrey A Law
1997-09-29 15:05     ` Jim Wilson
1997-10-08  4:30 meissner

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).