]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix handling of flag_rename_registers by a target.
authorMartin Liska <mliska@suse.cz>
Tue, 12 Oct 2021 14:05:49 +0000 (16:05 +0200)
committerMartin Liska <mliska@suse.cz>
Wed, 13 Oct 2021 13:02:43 +0000 (15:02 +0200)
PR target/102688

gcc/ChangeLog:

* common.opt: Use EnabledBy instead of detection in
finish_options and process_options.
* opts.c (finish_options): Remove handling of
x_flag_unroll_all_loops.
* toplev.c (process_options): Likewise for flag_web and
flag_rename_registers.

gcc/common.opt
gcc/opts.c
gcc/toplev.c

index 4099effcc802f6779d20e75bc057ed418914377f..1eedfeaf53978128bd561430947592b2ea9b526b 100644 (file)
@@ -2399,7 +2399,7 @@ Common Var(flag_live_range_shrinkage) Init(0) Optimization
 Relief of register pressure through live range shrinkage.
 
 frename-registers
-Common Var(flag_rename_registers) Optimization
+Common Var(flag_rename_registers) Optimization EnabledBy(funroll-loops)
 Perform a register renaming optimization pass.
 
 fschedule-fusion
@@ -2935,7 +2935,7 @@ Common Var(flag_unit_at_a_time) Init(1)
 Compile whole compilation unit at a time.
 
 funroll-loops
-Common Var(flag_unroll_loops) Optimization
+Common Var(flag_unroll_loops) Optimization EnabledBy(funroll-all-loops)
 Perform loop unrolling when iteration count is known.
 
 funroll-all-loops
@@ -3158,7 +3158,7 @@ Common Var(flag_value_profile_transformations) Optimization
 Use expression value profiles in optimizations.
 
 fweb
-Common Var(flag_web) Optimization
+Common Var(flag_web) Optimization EnabledBy(funroll-loops)
 Construct webs and split unrelated uses of single variable.
 
 ftree-builtin-call-dce
index 2116c2991dd6750c37015d3da3ff16cb0d0f047c..fc71b6e424231075976bb230adfef5e31f828cb5 100644 (file)
@@ -1321,11 +1321,6 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
                                       opts->x_flag_live_patching,
                                       loc);
 
-  /* Unrolling all loops implies that standard loop unrolling must also
-     be done.  */
-  if (opts->x_flag_unroll_all_loops)
-    opts->x_flag_unroll_loops = 1;
-
   /* Allow cunroll to grow size accordingly.  */
   if (!opts_set->x_flag_cunroll_grow_size)
     opts->x_flag_cunroll_grow_size
index 167feac2583f6aace95aa3f205031adb495bcf30..81546b19e91017510b5b86073169f18b09ee4c08 100644 (file)
@@ -1331,13 +1331,6 @@ process_options (bool no_backend)
       flag_abi_version = 2;
     }
 
-  /* web and rename-registers help when run after loop unrolling.  */
-  if (!OPTION_SET_P (flag_web))
-    flag_web = flag_unroll_loops;
-
-  if (!OPTION_SET_P (flag_rename_registers))
-    flag_rename_registers = flag_unroll_loops;
-
   if (flag_non_call_exceptions)
     flag_asynchronous_unwind_tables = 1;
   if (flag_asynchronous_unwind_tables)