From: Jan Hubicka Date: Sun, 11 Jun 2017 09:33:22 +0000 (+0200) Subject: opts.c (finish_options): Move test for flag_split_stack after it has been initialized. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=227b76c3b4ef63b1226f4e584dbdf42c9e56ff9f;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ddc0ee4692..c3bd0402b25 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-10 Jan Hubicka + + * opts.c (finish_options): Move test for flag_split_stack after + it has been initialized. + 2017-06-11 Jason Merrill * tree.h (id_equal): New. diff --git a/gcc/opts.c b/gcc/opts.c index 5ec99807f22..60ebe56c8a4 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) {