OSDN Git Service

* common.opt (fvar-tracking-uninit): Document.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Nov 2012 23:00:53 +0000 (23:00 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Nov 2012 23:00:53 +0000 (23:00 +0000)
* toplev.c (process_options): Fix handling of flag_var_tracking_uninit.
* config/darwin.c (darwin_override_options): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@193458 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/common.opt
gcc/config/darwin.c
gcc/toplev.c

index 38d859d..c7fce0b 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-12  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * common.opt (fvar-tracking-uninit): Document.
+       * toplev.c (process_options): Fix handling of flag_var_tracking_uninit.
+       * config/darwin.c (darwin_override_options): Likewise.
+
 2012-11-11  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/sparc/sparc.h (AS_NIAGARA3_FLAG): Tweak.
index 033fbe0..273482f 100644 (file)
@@ -2112,6 +2112,10 @@ fvar-tracking-assignments-toggle
 Common Report Var(flag_var_tracking_assignments_toggle) Optimization
 Toggle -fvar-tracking-assignments
 
+; Positive if we should track uninitialized variables, negative if
+; we should run the var-tracking pass only to discard debug
+; annotations.  When flag_var_tracking_uninit == AUTODETECT_VALUE it
+; will be set according to flag_var_tracking.
 fvar-tracking-uninit
 Common Report Var(flag_var_tracking_uninit) Optimization
 Perform variable tracking and also tag variables that are uninitialized
index ba253dd..63684e3 100644 (file)
@@ -3024,12 +3024,12 @@ darwin_override_options (void)
       darwin_emit_branch_islands = true;
     }
 
-  if (flag_var_tracking
+  if (flag_var_tracking_uninit == 0
       && generating_for_darwin_version >= 9
       && (flag_gtoggle ? (debug_info_level == DINFO_LEVEL_NONE)
       : (debug_info_level >= DINFO_LEVEL_NORMAL))
       && write_symbols == DWARF2_DEBUG)
-    flag_var_tracking_uninit = 1;
+    flag_var_tracking_uninit = flag_var_tracking;
 
   if (MACHO_DYNAMIC_NO_PIC_P)
     {
index c145af4..6f1da41 100644 (file)
@@ -1494,12 +1494,15 @@ process_options (void)
   /* If the user specifically requested variable tracking with tagging
      uninitialized variables, we need to turn on variable tracking.
      (We already determined above that variable tracking is feasible.)  */
-  if (flag_var_tracking_uninit)
+  if (flag_var_tracking_uninit == 1)
     flag_var_tracking = 1;
 
   if (flag_var_tracking == AUTODETECT_VALUE)
     flag_var_tracking = optimize >= 1;
 
+  if (flag_var_tracking_uninit == AUTODETECT_VALUE)
+    flag_var_tracking_uninit = flag_var_tracking;
+
   if (flag_var_tracking_assignments == AUTODETECT_VALUE)
     flag_var_tracking_assignments = flag_var_tracking
       && !(flag_selective_scheduling || flag_selective_scheduling2);