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]

minor gcse.c bugfix



Code hoisting/unification wasn't working.  There was a spurious !optimize_size
check which I somehow missed when gcse.c was originally contributed to GCC.

I missed it when diffing the Cygnus & GCC trees because some unrelated
work Cygnus has done in that area of code obscured the difference.

Anyway, this gets code hoisting to do its thing with -Os in the GCC tree 
Jeez, I feel like an idiot since it's been in there since rev 1.1 of gcse.c
available to the general public.

	* gcse.c (hash_scan_set): Remove incorrect ! optimize_size check.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcse.c,v
retrieving revision 1.55
diff -c -3 -p -r1.55 gcse.c
*** gcse.c	1999/10/16 07:08:27	1.55
--- gcse.c	1999/10/17 08:52:49
*************** hash_scan_set (pat, insn, set_p)
*** 1912,1918 ****
  	{
  	  /* An expression is not anticipatable if its operands are
  	     modified before this insn.  */
! 	  int antic_p = ! optimize_size && oprs_anticipatable_p (src, insn);
  	  /* An expression is not available if its operands are
  	     subsequently modified, including this insn.  */
  	  int avail_p = oprs_available_p (src, insn);
--- 1912,1918 ----
  	{
  	  /* An expression is not anticipatable if its operands are
  	     modified before this insn.  */
! 	  int antic_p = oprs_anticipatable_p (src, insn);
  	  /* An expression is not available if its operands are
  	     subsequently modified, including this insn.  */
  	  int avail_p = oprs_available_p (src, insn);














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