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]
Other format: [Raw text]

[PATCH, RA]: Fix PR 39914: 96% performance regression in FP code with -O1


Hello!

The fix for PR debug/39432 introduced big runtime regression for -O1 compiled code. IMO, such a performance hit is not acceptable with -O1, we want to _optimize_ the code with -O. We have -O0 to achieve full debug functionality.

Attached patch reportedly fixes this regression.

2009-04-28 Uros Bizjak <ubizjak@gmail.com>

   * ira-conflicts.c (ira_build_conflicts): Prohibit call used
   registers for allocnos created from user-defined variables only
   when not optimizing.

Patch was tested on x86_64-pc-linux-gnu. OK for mainline and 4.4.1 ?

Uros.
Index: ira-conflicts.c
===================================================================
--- ira-conflicts.c	(revision 146880)
+++ ira-conflicts.c	(working copy)
@@ -806,7 +806,7 @@ ira_build_conflicts (void)
       if ((! flag_caller_saves && ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
 	  /* For debugging purposes don't put user defined variables in
 	     callee-clobbered registers.  */
-	  || (optimize <= 1
+	  || (optimize == 0
 	      && (attrs = REG_ATTRS (regno_reg_rtx [ALLOCNO_REGNO (a)])) != NULL
 	      && (decl = attrs->decl) != NULL
 	      && VAR_OR_FUNCTION_DECL_P (decl)

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