aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-06-11 11:33:22 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-06-11 09:33:22 +0000
commit227b76c3b4ef63b1226f4e584dbdf42c9e56ff9f (patch)
tree01234a488925b1d0e85044e16a4344c28f955969
parentc3b0f4c600b0a551132e52446bdccc23952fdefb (diff)
downloadgcc-227b76c3b4ef63b1226f4e584dbdf42c9e56ff9f.zip
gcc-227b76c3b4ef63b1226f4e584dbdf42c9e56ff9f.tar.gz
gcc-227b76c3b4ef63b1226f4e584dbdf42c9e56ff9f.tar.bz2
opts.c (finish_options): Move test for flag_split_stack after it has been initialized.
* opts.c (finish_options): Move test for flag_split_stack after it has been initialized. From-SVN: r249105
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/opts.c27
2 files changed, 19 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8ddc0ee..c3bd040 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-10 Jan Hubicka <hubicka@ucw.cz>
+
+ * opts.c (finish_options): Move test for flag_split_stack after
+ it has been initialized.
+
2017-06-11 Jason Merrill <jason@redhat.com>
* tree.h (id_equal): New.
diff --git a/gcc/opts.c b/gcc/opts.c
index 5ec9980..60ebe56 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -863,19 +863,6 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
opts->x_flag_reorder_blocks = 1;
}
- /* If stack splitting is turned on, and the user did not explicitly
- request function partitioning, turn off partitioning, as it
- confuses the linker when trying to handle partitioned split-stack
- code that calls a non-split-stack functions. But if partitioning
- was turned on explicitly just hope for the best. */
- if (opts->x_flag_split_stack
- && opts->x_flag_reorder_blocks_and_partition
- && !opts_set->x_flag_reorder_blocks_and_partition)
- opts->x_flag_reorder_blocks_and_partition = 0;
-
- if (opts->x_flag_reorder_blocks_and_partition
- && !opts_set->x_flag_reorder_functions)
- opts->x_flag_reorder_functions = 1;
/* Pipelining of outer loops is only possible when general pipelining
capabilities are requested. */
@@ -927,6 +914,20 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
}
}
+ /* If stack splitting is turned on, and the user did not explicitly
+ request function partitioning, turn off partitioning, as it
+ confuses the linker when trying to handle partitioned split-stack
+ code that calls a non-split-stack functions. But if partitioning
+ was turned on explicitly just hope for the best. */
+ if (opts->x_flag_split_stack
+ && opts->x_flag_reorder_blocks_and_partition
+ && !opts_set->x_flag_reorder_blocks_and_partition)
+ opts->x_flag_reorder_blocks_and_partition = 0;
+
+ if (opts->x_flag_reorder_blocks_and_partition
+ && !opts_set->x_flag_reorder_functions)
+ opts->x_flag_reorder_functions = 1;
+
/* Tune vectorization related parametees according to cost model. */
if (opts->x_flag_vect_cost_model == VECT_COST_MODEL_CHEAP)
{