This is the mail archive of the gcc@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]

Re: VTA guality assessment: better than -O0 ;-)


On Sun, Jun 14, 2009 at 11:17:32AM -0400, Daniel Jacobowitz wrote:
> On Sat, Jun 13, 2009 at 10:08:39PM +0200, Jakub Jelinek wrote:
> > I really think we need to do (limited) -fvar-tracking even for -O0, it is
> > really bad that most arguments have wrong locations through the prologue,
> > while at -O1 or above they often have correct location.
> > We should just do the tracking inside of the prologue or for register
> > variables, those that are stored into memory during the prologue and live in
> > memory shouldn't be tracked outside of the prologue at -O0.
> 
> I completely agree, this would make GDB more useful.

--- gcc/var-tracking.c.jj	2009-05-04 16:46:38.000000000 +0200
+++ gcc/var-tracking.c	2009-06-17 17:48:58.000000000 +0200
@@ -1652,6 +1652,8 @@ track_expr_p (tree expr)
       if (MEM_SIZE (decl_rtl)
 	  && INTVAL (MEM_SIZE (decl_rtl)) > MAX_VAR_PARTS)
 	return 0;
+      if (!optimize && TREE_CODE (expr) == VAR_DECL)
+	return 0;      
     }
 
   return 1;

decreased the -O0 -g -fvar-tracking debuginfo on the trunk quite a bit,
I don't think there is any point in tracking VAR_DECLs that live in MEM,
only PARM_DECLs (which during the prologue might move from registers)
and VAR_DECLs that don't have MEM decl_rtl (at -O0 those are just vars
with register keyword I believe from the ones var-tracking would track).
Still, I think for -O0 -g -fvar-tracking we should note that the parms
moved into their desired slots immediately (e.g. by pretending the register
from which they have been stored was also clobbered on the same
instruction).

	Jakub


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