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]

Re: [trunk<-vta] Re: [vtab] Permit coalescing of user variables


On Jun  1, 2009, Alexandre Oliva <aoliva@redhat.com> wrote:

> The patch below (ping) implements two other possibilities: refraining
> from coalescing even inlined SSA names, which might enable better debug
> information to be generated, and enabling coalescing of all related
> variables, for better code at the expense of debug information.  The
> default remains unchanged.

And the patch below changes the default so that we can optimize more.
This will worsen debug information unless VTA is enabled by default, so
I request a review and approval for inclusion only after VTA or
something equivalent makes it to the trunk.

Ok to install then?

This was bootstrapped and regtested on x86_64-linux-gnu and
i686-pc-linux-gnu, along with the other patches I'm pinging in this
batch.

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* common.opt (ftree-coalesce-inlined-vars): Change default.
	* doc/invoke.texi: Document default change.  Mention
	var-tracking-assignments.

Index: gcc/common.opt
===================================================================
--- gcc/common.opt.orig	2009-05-28 20:59:37.000000000 -0300
+++ gcc/common.opt	2009-05-28 21:01:15.000000000 -0300
@@ -1171,7 +1171,7 @@ Common Report Var(flag_tree_ch) Optimiza
 Enable loop header copying on trees
 
 ftree-coalesce-inlined-vars
-Common Report Var(flag_ssa_coalesce_vars,1) Init(1) RejectNegative Optimization
+Common Report Var(flag_ssa_coalesce_vars,1) Init(2) RejectNegative Optimization
 Permit SSA coalescing of inlined variables only
 
 ftree-coalesce-vars
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi.orig	2009-05-28 20:58:46.000000000 -0300
+++ gcc/doc/invoke.texi	2009-05-28 21:01:05.000000000 -0300
@@ -6473,11 +6473,12 @@ Permit the copyrename pass to subject in
 into other variables.  This may harm debug information of such inlined
 variables, but it will keep variables of the main function apart from
 each other, such that they are more likely to contain the expected
-values in a debugging session.  This option is enabled by default.
+values in a debugging session.
 
 @item -ftree-coalesce-vars
 Permit the copyrename pass to subject all variables to SSA coalescing.
-This may severely limit the ability to debug a program.  In the negated
+This may severely limit the ability to debug an optimized program
+compiled without @option{-fvar-tracking-assignments}.  In the negated
 form, this flag prevents SSA coalescing of user variables, including
 inlined ones.
 

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

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