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: VTA merge - cmdline


cmdline (7K) - new command line flags to turn VTA on or off, as well as
a few debugging options that helped me debug it

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi.orig	2009-06-05 05:44:17.000000000 -0300
+++ gcc/doc/invoke.texi	2009-06-05 05:45:58.000000000 -0300
@@ -306,12 +306,14 @@ Objective-C and Objective-C++ Dialects}.
 -fcompare-debug@r{[}=@var{opts}@r{]}  -fcompare-debug-second @gol
 -feliminate-dwarf2-dups -feliminate-unused-debug-types @gol
 -feliminate-unused-debug-symbols -femit-class-debug-always @gol
--fmem-report -fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs @gol
+-fmem-report -fmin-insn-uid=@var{uid} @gol
+-fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs @gol
 -frandom-seed=@var{string} -fsched-verbose=@var{n} @gol
 -fsel-sched-verbose -fsel-sched-dump-cfg -fsel-sched-pipelining-verbose @gol
 -ftest-coverage  -ftime-report -fvar-tracking @gol
--g  -g@var{level}  -gtoggle  -gcoff  -gdwarf-2 @gol
--ggdb  -gstabs  -gstabs+  -gvms  -gxcoff  -gxcoff+ @gol
+-fvar-tracking-assigments  -fvar-tracking-assignments-toggle @gol
+-fverbose-cselib  -g  -g@var{level}  -gtoggle  @gol
+-gcoff  -gdwarf-2 -ggdb  -gstabs  -gstabs+  -gvms  -gxcoff  -gxcoff+ @gol
 -fno-merge-debug-strings -fno-dwarf2-cfi-asm @gol
 -fdebug-prefix-map=@var{old}=@var{new} @gol
 -femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
@@ -4566,6 +4568,14 @@ pass when it finishes.
 Makes the compiler print some statistics about permanent memory
 allocation when it finishes.
 
+@item -fmin-insn-uid=@var{uid}
+@opindex fmin-insn-uid
+Use uids starting at @var{uid} for non-debug insns created by
+@option{-fvar-tracking-assignments}.  The range below @var{uid} is
+reserved exclusively for debug insns, but debug insns may get
+(non-overlapping) uids above @var{uid} if the reserved range is
+exhausted.
+
 @item -fpre-ipa-mem-report
 @opindex fpre-ipa-mem-report
 @item -fpost-ipa-mem-report
@@ -5384,6 +5394,26 @@ It is enabled by default when compiling 
 @option{-O}, @option{-O2}, @dots{}), debugging information (@option{-g}) and
 the debug info format supports it.
 
+@item -fvar-tracking-assignments
+@opindex fvar-tracking-assignments
+@opindex fno-var-tracking-assignments
+Annotate assignments to user variables early in the compilation and
+attempt to carry the annotations over throughout the compilation all the
+way to the end, in an attempt to improve debug information while
+optimizing.  It is verbosely disabled if it's enabled with var-tracking
+disabled.
+
+@item -fvar-tracking-assignments-toggle
+@opindex fvar-tracking-assignments-toggle
+@opindex fno-var-tracking-assignments-toggle
+Toggle @option{-fvar-tracking-assignments}, in the same way that
+@option{-gtoggle} toggles @option{-g}.
+
+@item -fverbose-cselib
+@opindex fverbose-cselib
+Cause cselib to add a lot of information to the dump files of passes
+that use it, if dumping is enabled on such passes.
+
 @item -print-file-name=@var{library}
 @opindex print-file-name
 Print the full absolute name of the library file @var{library} that
Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c.orig	2009-06-05 05:44:17.000000000 -0300
+++ gcc/toplev.c	2009-06-05 06:48:04.000000000 -0300
@@ -324,6 +324,16 @@ rtx stack_limit_rtx;
    to optimize, debug_info_level and debug_hooks in process_options ().  */
 int flag_var_tracking = AUTODETECT_VALUE;
 
+/* Nonzero if we should track variable assignments.  When
+   flag_var_tracking_assignments == AUTODETECT_VALUE it will be set
+   according to flag_var_tracking, optimize, debug_info_level and
+   debug_hooks in process_options ().  */
+int flag_var_tracking_assignments = AUTODETECT_VALUE;
+
+/* Nonzero if we should toggle flag_var_tracking_assignments after
+   processing options and computing its default.  */
+int flag_var_tracking_assignments_toggle = 0;
+
 /* Type of stack check.  */
 enum stack_check_type flag_stack_check = NO_STACK_CHECK;
 
@@ -1959,7 +1969,8 @@ process_options (void)
       || debug_hooks->var_location == do_nothing_debug_hooks.var_location)
     {
       if (flag_var_tracking == 1
-	  || flag_var_tracking_uninit == 1)
+	  || flag_var_tracking_uninit == 1
+	  || flag_var_tracking_assignments == 1)
         {
 	  if (debug_info_level < DINFO_LEVEL_NORMAL)
 	    warning (0, "variable tracking requested, but useless unless "
@@ -1970,6 +1981,7 @@ process_options (void)
 	}
       flag_var_tracking = 0;
       flag_var_tracking_uninit = 0;
+      flag_var_tracking_assignments = 0;
     }
 
   if (flag_rename_registers == AUTODETECT_VALUE)
@@ -1979,6 +1991,20 @@ process_options (void)
   if (flag_var_tracking == AUTODETECT_VALUE)
     flag_var_tracking = optimize >= 1;
 
+  if (flag_var_tracking_assignments == AUTODETECT_VALUE)
+    flag_var_tracking_assignments = 0;
+
+  if (flag_var_tracking_assignments_toggle)
+    flag_var_tracking_assignments = !flag_var_tracking_assignments
+      && flag_var_tracking;
+
+  if (flag_var_tracking_assignments && !flag_var_tracking)
+    {
+      warning (0, "variable tracking in assignments requested, "
+	       "but useless without variable tracking");
+      flag_var_tracking_assignments = 0;
+    }
+
   if (flag_tree_cselim == AUTODETECT_VALUE)
 #ifdef HAVE_conditional_move
     flag_tree_cselim = 1;
Index: gcc/common.opt
===================================================================
--- gcc/common.opt.orig	2009-06-05 05:44:17.000000000 -0300
+++ gcc/common.opt	2009-06-05 05:45:58.000000000 -0300
@@ -769,6 +769,10 @@ fmessage-length=
 Common RejectNegative Joined UInteger
 -fmessage-length=<number>	Limit diagnostics to <number> characters per line.  0 suppresses line-wrapping
 
+fmin-insn-uid=
+Common RejectNegative Var(flag_min_insn_uid) Init(0) Joined UInteger
+Use insn uids above the given value for non-debug insns.
+
 fmodulo-sched
 Common Report Var(flag_modulo_sched) Optimization
 Perform SMS based modulo scheduling before the first scheduling pass
@@ -1338,6 +1342,14 @@ fvar-tracking
 Common Report Var(flag_var_tracking) VarExists Optimization
 Perform variable tracking
 
+fvar-tracking-assignments
+Common Report Var(flag_var_tracking_assignments) VarExists Optimization
+Perform variable tracking by annotating assignments
+
+fvar-tracking-assignments-toggle
+Common Report Var(flag_var_tracking_assignments_toggle) VarExists Optimization
+Toggle -fvar-tracking-assignments
+
 fvar-tracking-uninit
 Common Report Var(flag_var_tracking_uninit) Optimization
 Perform variable tracking and also tag variables that are uninitialized
@@ -1376,6 +1388,10 @@ fverbose-asm
 Common Report Var(flag_verbose_asm)
 Add extra commentary to assembler output
 
+fverbose-cselib
+Common Var(flag_verbose_cselib)
+Add a lot of information to dumps of passes that use cselib.
+
 fvisibility=
 Common Joined RejectNegative
 -fvisibility=[default|internal|hidden|protected]	Set the default symbol visibility
-- 
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]