public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Honnor ix86_accumulate_outgoing_args again
@ 2013-10-02 17:32 Jan Hubicka
  2013-10-02 22:45 ` Jan Hubicka
  0 siblings, 1 reply; 21+ messages in thread
From: Jan Hubicka @ 2013-10-02 17:32 UTC (permalink / raw)
  To: gcc-patches, hjl.tools, ubizjak, rth, Ganesh.Gopalasubramanian

Hi,
currently ix86_accumulate_outgoing_args is ignored on all targets except for
Solaris (that sets USE_IX86_FRAME_POINTER to true).  It seems like accidental
effect of http://gcc.gnu.org/ml/gcc-patches/2010-08/txt00102.txt that enabled
omit-frame-pointer for 32bit (I take the 64bit change was purely accidental)
probably based on the fact non-accumulate-outgoing-args was not doing well with
assynchronous unwind info.

The reason for this seems to be gone by
http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00995.html

So I thing we ought to honnor accumulate-outgoing-args again and in fact
consider disabling it for generic - it is disabled for core (that may need
re-benchmarking). For all AMD targets it is currently on.  I tested disabling
it on buldozer 32bit and it seems mostly SPEC neutral for specint2000 (I am
wating for more benchmarks) with very nice code size improvements in all
benchmarks with exception of MCF with LTO (not sure at all why), with overall
reduction of 5.2% (same gain as we get for -flto aproximately)
http://gcc.opensuse.org/SPEC/CINT/sb-megrez-head-64-32o-32bit/size.html

There may be close to noise factor drops as seen in
http://gcc.opensuse.org/SPEC/CINT/sb-megrez-head-64-32o-32bit/recent.html I
will see how other tests shape and wait for multiple runs to show how much of
this is actual noise. We may consider disabling it for size optimized functions
and -O2 (and not for -O3) at least.

This patch however only remove code forcingly enabling
MASK_ACCUMULATE_OUTGOING_ARGS.  If there will be no complains, I will commit it
tomorrow.

Honza

	* i386.c (ix86_option_override_internal): Do not force
	ACCUMULATE_OUTGOING_ARGS when unwind info is generated.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 203117)
+++ config/i386/i386.c	(working copy)
@@ -3793,28 +3793,11 @@ ix86_option_override_internal (bool main
       }
 
   ix86_tune_mask = 1u << ix86_tune;
-  if ((!USE_IX86_FRAME_POINTER
-       || (x86_accumulate_outgoing_args & ix86_tune_mask))
+  if ((x86_accumulate_outgoing_args & ix86_tune_mask)
       && !(target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
       && !optimize_size)
     target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
 
-  /* ??? Unwind info is not correct around the CFG unless either a frame
-     pointer is present or M_A_O_A is set.  Fixing this requires rewriting
-     unwind info generation to be aware of the CFG and propagating states
-     around edges.  */
-  if ((flag_unwind_tables || flag_asynchronous_unwind_tables
-       || flag_exceptions || flag_non_call_exceptions)
-      && flag_omit_frame_pointer
-      && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
-    {
-      if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
-	warning (0, "unwind tables currently require either a frame pointer "
-		 "or %saccumulate-outgoing-args%s for correctness",
-		 prefix, suffix);
-      target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
-    }
-
   /* If stack probes are required, the space used for large function
      arguments on the stack must also be probed, so enable
      -maccumulate-outgoing-args so this happens in the prologue.  */

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

end of thread, other threads:[~2013-11-13  5:10 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-02 17:32 Honnor ix86_accumulate_outgoing_args again Jan Hubicka
2013-10-02 22:45 ` Jan Hubicka
2013-10-02 22:51   ` H.J. Lu
2013-10-03  9:24     ` Jan Hubicka
2013-10-03  1:11   ` Vladimir Makarov
2013-10-03 13:05     ` Jan Hubicka
2013-10-10 18:48       ` Jan Hubicka
     [not found]         ` <0EFAB2BDD0F67E4FB6CCC8B9F87D7569427DC81A@IRSMSX101.ger.corp.intel.com>
     [not found]           ` <20131014164343.GA17422@kam.mff.cuni.cz>
     [not found]             ` <0EFAB2BDD0F67E4FB6CCC8B9F87D7569427DE1D0@IRSMSX101.ger.corp.intel.com>
     [not found]               ` <0EFAB2BDD0F67E4FB6CCC8B9F87D7569427F84D0@IRSMSX101.ger.corp.intel.com>
2013-10-19 21:28                 ` Jan Hubicka
2013-10-21  8:01                   ` Vladimir Makarov
2013-11-03  9:59                     ` Zamyatin, Igor
2013-10-22  8:36                   ` Zamyatin, Igor
2013-10-31 11:23         ` Florian Weimer
2013-11-12  7:01         ` Jakub Jelinek
2013-11-12  7:09           ` H.J. Lu
2013-11-12 12:45             ` Jan Hubicka
2013-11-12 13:03               ` Jakub Jelinek
2013-11-12 14:36                 ` H.J. Lu
2013-11-12 16:43                 ` Vladimir Makarov
2013-11-12 16:44                   ` Jakub Jelinek
2013-11-12 19:42                     ` Jan Hubicka
2013-11-13  8:10                 ` Gopalasubramanian, Ganesh

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