[PATCH] Make dataflow analyzer mark defs for call_fixed_regs

Daniel Berlin dan@cgsoftware.com
Fri Jul 13 22:13:00 GMT 2001


This one is obvious, but i want to make sure i'm not stupid.

Without this, the store motion fixes make it decide it would be fine
to move things using r31 (a call fixed reg on PPC) across const calls.


2001-07-14  Daniel Berlin  <dan@cgsoftware.com>
 
        * df.c (df_insn_refs_record): Call fixed regs are always unusable
        over calls.
Index: df.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/df.c,v
retrieving revision 1.3
diff -c -3 -p -w -B -b -r1.3 df.c
*** df.c	2001/07/10 16:27:54	1.3
--- df.c	2001/07/14 05:11:34
*************** df_insn_refs_record (df, bb, insn)
*** 1272,1281 ****
  		 global or fixed and have not been explicitly defined
  		 in the call pattern.  */
  	      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
! 		if (call_used_regs[i] 
  		    && ! global_regs[i]
  		    && ! fixed_regs[i]
  		    && ! df_insn_regno_def_p (df, bb, insn, i))
  		  {
  		    rtx reg_clob = df_reg_clobber_gen (i);
  		    df_defs_record (df, reg_clob, bb, insn);
--- 1272,1282 ----
  		 global or fixed and have not been explicitly defined
  		 in the call pattern.  */
  	      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
! 		if ((call_used_regs[i] 
  		    && ! global_regs[i]
  		    && ! fixed_regs[i]
  		     && ! df_insn_regno_def_p (df, bb, insn, i)) 
+ 		    || call_fixed_regs[i])
  		  {
  		    rtx reg_clob = df_reg_clobber_gen (i);
  		    df_defs_record (df, reg_clob, bb, insn);

-- 
"A while ago, I went skiing in England.  It was a rare package:
two weeks in England, one night in Connecticut, two weeks in
England.  I said, "Yes, I'll take it."  I got on this chairlift
with this guy I didn't know.  We went halfway up the mountain
without saying a word.  Then he turned to me and said, "You
know, this is the first time I've gone skiing in ten years."  I
said, "Why did you take such a long time off?"  He said, "I was
in prison.  Want to know why?"  I said, "Not really.  Well, you
better tell me why."  He said, "I pushed a total stranger off a
Ferris wheel."  I said, "I remember you."
"-Steven Wright



More information about the Gcc-patches mailing list