From 014d92e193f6ef3d06143984524b72ee020a7c04 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 11 Nov 2010 23:54:53 +0100 Subject: [PATCH] invoke.texi (-fwhopr): Merge into -flto section. * doc/invoke.texi (-fwhopr): Merge into -flto section. (-flto-partition): Document none. * gcc.c (LINK_COMMAND_SPEC): Remove -fwhopr. * lto-wrapper.c: Update comment. (run_gcc): Update LTO option parsing. * opts.c (finish_options): add support -flto-partition=none (common_handle_option): Remove fwhopr. * common.opt: Turn fwhopr into flto. * collect2.c (main): Update option handling. * cgraphunit.c (cgraph_decide_is_function_needed): Remove flag_whopr. * ipa-split.c (execute_split_functions): Remove flag_whopr. * ipa.c (function_and_variable_visibility): Remove flag_whopr. * ipa-prop.c (ipa_compute_jump_functions): Remove flag_whopr. * varpool.c (decide_is_variable_needed): Remove flag_whopr. * gcc.dg/20081223-1.c: Update LTO options. * gcc.dg/lto/20090206-1_0.c: Update LTO options. * gcc.dg/lto/20081118_0.c: Update LTO options. * gcc.dg/lto/ipareference_0.c: Update LTO options. * gcc.dg/lto/20100423-2_0.c: Update LTO options. * gcc.dg/lto/20081201-1_0.c: Update LTO options. * gcc.dg/lto/ipacp_0.c: Update LTO options. * gcc.dg/lto/20090116_0.c: Update LTO options. * gcc.dg/lto/20091015-1_0.c: Update LTO options. * gcc.dg/lto/20090126-2_0.c: Update LTO options. * gcc.dg/lto/20081202-2_0.c: Update LTO options. * gcc.dg/lto/20081204-1_0.c: Update LTO options. * gcc.dg/lto/const-uniq_0.c: Update LTO options. * gcc.dg/lto/20081224_0.c: Update LTO options. * gcc.dg/lto/20090219_0.c: Update LTO options. * gcc.dg/lto/ipareference2_0.c: Update LTO options. * gcc.dg/lto/20090206-2_0.c: Update LTO options. * gcc.dg/lto/20081115_0.c: Update LTO options. * gcc.dg/lto/20081201-2_0.c: Update LTO options. * gcc.dg/lto/20081120-2_0.c: Update LTO options. * gcc.dg/lto/materialize-1_0.c: Update LTO options. * gcc.dg/lto/20090126-1_0.c: Update LTO options. * gcc.dg/lto/20081202-1_0.c: Update LTO options. * gcc.dg/lto/noreturn-1_0.c: Update LTO options. * g++.dg/20090107-1.C: Update LTO options. * g++.dg/lto/pr45679-2_0.C: Update LTO options. * g++.dg/lto/20081123_0.C: Update LTO options. * g++.dg/lto/20090313_0.C: Update LTO options. * g++.dg/lto/20081125_0.C: Update LTO options. * g++.dg/lto/20081109-1_0.C: Update LTO options. * g++.dg/lto/20081219_0.C: Update LTO options. * g++.dg/lto/20100724-1_0.C: Update LTO options. * g++.dg/lto/20081204-1_0.C: Update LTO options. * g++.dg/lto/20090303_0.C: Update LTO options. * g++.dg/lto/20100723-1_0.C: Update LTO options. * g++.dg/lto/pr45679-1_0.C: Update LTO options. * g++.dg/lto/20090128_0.C: Update LTO options. * g++.dg/lto/20081204-2_0.C: Update LTO options. * g++.dg/lto/20090302_0.C: Update LTO options. * g++.dg/lto/20081119-1_0.C: Update LTO options. * g++.dg/lto/20081118_0.C: Update LTO options. * g++.dg/20090121-1.C: Update LTO options. * objc.dg/lto/lto.exp: Update LTO options. * lib/lto.exp: Update LTO options. * lib/gcc-dg.exp: Update LTO options. * lib/c-torture.exp: Update LTO options. * obj-c++.dg/lto/lto.exp: Update LTO options. From-SVN: r166625 --- gcc/ChangeLog | 17 ++++++++ gcc/cgraphunit.c | 3 +- gcc/collect2.c | 18 ++++---- gcc/common.opt | 18 ++++---- gcc/doc/invoke.texi | 39 ++++++----------- gcc/gcc.c | 6 +-- gcc/ipa-prop.c | 2 +- gcc/ipa-split.c | 2 +- gcc/ipa.c | 2 +- gcc/lto-wrapper.c | 20 ++++++--- gcc/opts.c | 23 +++++----- gcc/testsuite/ChangeLog | 50 ++++++++++++++++++++++ gcc/testsuite/g++.dg/20090107-1.C | 2 +- gcc/testsuite/g++.dg/20090121-1.C | 2 +- gcc/testsuite/g++.dg/lto/20081109-1_0.C | 4 +- gcc/testsuite/g++.dg/lto/20081118_0.C | 2 +- gcc/testsuite/g++.dg/lto/20081119-1_0.C | 2 +- gcc/testsuite/g++.dg/lto/20081123_0.C | 2 +- gcc/testsuite/g++.dg/lto/20081125_0.C | 2 +- gcc/testsuite/g++.dg/lto/20081204-1_0.C | 2 +- gcc/testsuite/g++.dg/lto/20081204-2_0.C | 2 +- gcc/testsuite/g++.dg/lto/20081219_0.C | 4 +- gcc/testsuite/g++.dg/lto/20090128_0.C | 2 +- gcc/testsuite/g++.dg/lto/20090302_0.C | 2 +- gcc/testsuite/g++.dg/lto/20090303_0.C | 2 +- gcc/testsuite/g++.dg/lto/20090313_0.C | 4 +- gcc/testsuite/g++.dg/lto/20100723-1_0.C | 2 +- gcc/testsuite/g++.dg/lto/20100724-1_0.C | 2 +- gcc/testsuite/g++.dg/lto/pr45679-1_0.C | 2 +- gcc/testsuite/g++.dg/lto/pr45679-2_0.C | 2 +- gcc/testsuite/gcc.dg/20081223-1.c | 2 +- gcc/testsuite/gcc.dg/lto/20081115_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20081118_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20081120-2_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20081201-1_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20081201-2_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20081202-1_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20081202-2_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20081204-1_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20081224_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20090116_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20090126-1_0.c | 4 +- gcc/testsuite/gcc.dg/lto/20090126-2_0.c | 4 +- gcc/testsuite/gcc.dg/lto/20090206-1_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20090206-2_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20090219_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20091015-1_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20100423-1_0.c | 2 +- gcc/testsuite/gcc.dg/lto/20100423-2_0.c | 2 +- gcc/testsuite/gcc.dg/lto/const-uniq_0.c | 2 +- gcc/testsuite/gcc.dg/lto/ipacp_0.c | 2 +- gcc/testsuite/gcc.dg/lto/ipareference2_0.c | 2 +- gcc/testsuite/gcc.dg/lto/ipareference_0.c | 2 +- gcc/testsuite/gcc.dg/lto/materialize-1_0.c | 2 +- gcc/testsuite/gcc.dg/lto/noreturn-1_0.c | 2 +- gcc/testsuite/lib/c-torture.exp | 4 +- gcc/testsuite/lib/gcc-dg.exp | 4 +- gcc/testsuite/lib/lto.exp | 6 ++- gcc/testsuite/obj-c++.dg/lto/lto.exp | 12 +++--- gcc/testsuite/objc.dg/lto/lto.exp | 12 +++--- gcc/varpool.c | 1 - 61 files changed, 198 insertions(+), 137 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ae4ecb8223..d5e85a28186 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2010-11-11 Jan Hubicka + + * doc/invoke.texi (-fwhopr): Merge into -flto section. + (-flto-partition): Document none. + * gcc.c (LINK_COMMAND_SPEC): Remove -fwhopr. + * lto-wrapper.c: Update comment. + (run_gcc): Update LTO option parsing. + * opts.c (finish_options): add support -flto-partition=none + (common_handle_option): Remove fwhopr. + * common.opt: Turn fwhopr into flto. + * collect2.c (main): Update option handling. + * cgraphunit.c (cgraph_decide_is_function_needed): Remove flag_whopr. + * ipa-split.c (execute_split_functions): Remove flag_whopr. + * ipa.c (function_and_variable_visibility): Remove flag_whopr. + * ipa-prop.c (ipa_compute_jump_functions): Remove flag_whopr. + * varpool.c (decide_is_variable_needed): Remove flag_whopr. + 2010-11-11 Jan Hubicka PR tree-optimize/40436 diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index c2d2fed9b1d..f98243955b7 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -197,8 +197,7 @@ cgraph_decide_is_function_needed (struct cgraph_node *node, tree decl) && !(DECL_CONTEXT (decl) && TREE_CODE (DECL_CONTEXT (decl)) == FUNCTION_DECL))) && !flag_whole_program - && !flag_lto - && !flag_whopr) + && !flag_lto) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl)) return true; diff --git a/gcc/collect2.c b/gcc/collect2.c index 37a535ba1a4..0d745ae0b8d 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1196,21 +1196,20 @@ main (int argc, char **argv) /* Parse command line early for instances of -debug. This allows the debug flag to be set before functions like find_a_file() - are called. We also look for the -flto or -fwhopr flag to know + are called. We also look for the -flto or -flto-partition=none flag to know what LTO mode we are in. */ { int i; + bool no_partition = false; for (i = 1; argv[i] != NULL; i ++) { if (! strcmp (argv[i], "-debug")) debug = true; - else if (! strcmp (argv[i], "-flto") && ! use_plugin) - { - use_verbose = true; - lto_mode = LTO_MODE_LTO; - } - else if (! strncmp (argv[i], "-fwhopr", 7) && ! use_plugin) + else if (! strcmp (argv[i], "-flto-partition=none")) + no_partition = true; + else if ((! strncmp (argv[i], "-flto=", 6) + || ! strcmp (argv[i], "-flto")) && ! use_plugin) { use_verbose = true; lto_mode = LTO_MODE_WHOPR; @@ -1239,6 +1238,8 @@ main (int argc, char **argv) #endif } vflag = debug; + if (no_partition) + lto_mode = LTO_MODE_LTO; } #ifndef DEFAULT_A_OUT_NAME @@ -1485,8 +1486,7 @@ main (int argc, char **argv) break; case 'f': - if (strcmp (arg, "-flto") == 0 - || strncmp (arg, "-fwhopr", 7) == 0) + if (strncmp (arg, "-flto", 5) == 0) { #ifdef ENABLE_LTO /* Do not pass LTO flag to the linker. */ diff --git a/gcc/common.opt b/gcc/common.opt index 71f45783b80..85eaa37bff3 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1138,9 +1138,13 @@ Common Ignore Does nothing. Preserved for backward compatibility. flto -Common Var(flag_lto) +Common Enable link-time optimization. +flto= +Common RejectNegative Joined Var(flag_lto) +Link-time optimization with number of parallel jobs or jobserver. + flto-partition=1to1 Common Var(flag_lto_partition_1to1) Partition functions and vars at linktime based on object files they originate from @@ -1149,6 +1153,10 @@ flto-partition=balanced Common Var(flag_lto_partition_balanced) Partition functions and vars at linktime into approximately same sized buckets +flto-partition=none +Common Var(flag_lto_partition_none) +Disable partioning and streaming + ; The initial value of -1 comes from Z_DEFAULT_COMPRESSION in zlib.h. flto-compression-level= Common Joined RejectNegative UInteger Var(flag_lto_compression_level) Init(-1) @@ -1879,14 +1887,6 @@ fweb Common Report Var(flag_web) Init(2) Optimization Construct webs and split unrelated uses of single variable -fwhopr -Common -Enable partitioned link-time optimization - -fwhopr= -Common RejectNegative Joined Var(flag_whopr) -Partitioned link-time optimization with number of parallel jobs or jobserver. - ftree-builtin-call-dce Common Report Var(flag_tree_builtin_call_dce) Init(0) Optimization Enable conditional dead code elimination for builtin calls diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index f19748391f6..f2deda3e21a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7429,14 +7429,14 @@ and those merged by attribute @code{externally_visible} become static functions and in effect are optimized more aggressively by interprocedural optimizers. If @command{gold} is used as the linker plugin, @code{externally_visible} attributes are automatically added to functions (not variable yet due to a current @command{gold} issue) that are accessed outside of LTO objects according to resolution file produced by @command{gold}. For other linkers that cannot generate resolution file, explicit @code{externally_visible} attributes are still necessary. While this option is equivalent to proper use of the @code{static} keyword for programs consisting of a single file, in combination with option -@option{-flto} or @option{-fwhopr} this flag can be used to +@option{-flto} this flag can be used to compile many smaller scale programs since the functions and variables become local for the whole combined compilation unit, not for the single source file itself. This option implies @option{-fwhole-file} for Fortran programs. -@item -flto +@item -flto[=@var{n}] @opindex flto This option runs the standard link-time optimizer. When invoked with source code, it generates GIMPLE (one of GCC's internal @@ -7575,12 +7575,13 @@ If you are not using @command{gold} and/or do not specify will be extracted and linked as usual, but they will not participate in the LTO optimization process. -Link time optimizations do not require the presence of the whole -program to operate. If the program does not require any symbols to -be exported, it is possible to combine @option{-flto} and -@option{-fwhopr} with @option{-fwhole-program} to allow the -interprocedural optimizers to use more aggressive assumptions which -may lead to improved optimization opportunities. +Link time optimizations do not require the presence of the whole program to +operate. If the program does not require any symbols to be exported, it is +possible to combine @option{-flto} and with @option{-fwhole-program} to allow +the interprocedural optimizers to use more aggressive assumptions which may +lead to improved optimization opportunities. +Use of @option{-fwhole-program} is not needed when linker plugin is +active (see @option{-fuse-linker-plugin}). Regarding portability: the current implementation of LTO makes no attempt at generating bytecode that can be ported between different @@ -7589,23 +7590,9 @@ strict version check, so bytecode files generated in one version of GCC will not work with an older/newer version of GCC. Link time optimization does not play well with generating debugging -information. Combining @option{-flto} or @option{-fwhopr} with +information. Combining @option{-flto} with @option{-g} is experimental. -This option is disabled by default. - -@item -fwhopr[=@var{n}] -@opindex fwhopr -This option is identical in functionality to @option{-flto} but it -differs in how the final link stage is executed. Instead of loading -all the function bodies in memory, the callgraph is analyzed and -optimization decisions are made (whole program analysis or WPA). Once -optimization decisions are made, the callgraph is partitioned and the -different sections are compiled separately (local transformations or -LTRANS)@. This process allows optimizations on very large programs -that otherwise would not fit in memory. This option enables -@option{-fwpa} and @option{-fltrans} automatically. - If you specify the optional @var{n} the link stage is executed in parallel using @var{n} parallel jobs by utilizing an installed @command{make} program. The environment variable @env{MAKE} may be @@ -7618,14 +7605,16 @@ The parent Makefile will need a @samp{+} prepended to the command recipe for this to work. This will likely only work if @env{MAKE} is GNU make. -Disabled by default. +This option is disabled by default. @item -flto-partition=@var{alg} @opindex flto-partition Specify partitioning algorithm used by @option{-fwhopr} mode. The value is either @code{1to1} to specify partitioning corresponding to source files or @code{balanced} to specify partitioning into, if possible, equally sized -chunks. The default value is @code{balanced}. +chunks. Specifying @code{none} as an algorithm disables partitioning +and streaming completely. +The default value is @code{balanced}. @item -fwpa @opindex fwpa diff --git a/gcc/gcc.c b/gcc/gcc.c index 5884f381772..fcb8a59f471 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -645,7 +645,7 @@ proper position among the other output files. */ /* We want %{T*} after %{L*} and %D so that it can be used to specify linker scripts which exist in user specified directories, or in standard directories. */ -/* We pass any -flto and -fwhopr flags on to the linker, which is expected +/* We pass any -flto flags on to the linker, which is expected to understand them. In practice, this means it had better be collect2. */ #ifndef LINK_COMMAND_SPEC #define LINK_COMMAND_SPEC "\ @@ -658,8 +658,8 @@ proper position among the other output files. */ %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} \ %{static:-plugin-opt=-pass-through=-lc} \ } \ - %{flto:%callee->analyzed && !flag_lto && !flag_whopr) + if (!cs->callee->analyzed && !flag_lto) continue; ipa_count_arguments (cs); /* If the descriptor of the callee is not initialized yet, we have to do diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index e46d270ec7e..1a553522153 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1251,7 +1251,7 @@ execute_split_functions (void) then inlining would still benefit. */ if ((!node->callers || !node->callers->next_caller) && !node->address_taken - && ((!flag_lto && !flag_whopr) || !node->local.externally_visible)) + && (!flag_lto || !node->local.externally_visible)) { if (dump_file) fprintf (dump_file, "Not splitting: not called directly " diff --git a/gcc/ipa.c b/gcc/ipa.c index 7c2c7f23baf..1dd85f80c36 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -938,7 +938,7 @@ function_and_variable_visibility (bool whole_program) static unsigned int local_function_and_variable_visibility (void) { - return function_and_variable_visibility (flag_whole_program && !flag_lto && !flag_whopr); + return function_and_variable_visibility (flag_whole_program && !flag_lto); } struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility = diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 540101773ef..dea51b07c73 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -32,7 +32,7 @@ along with GCC; see the file COPYING3. If not see The above will print something like /tmp/ccwbQ8B2.lto.o - If -fwhopr is used instead, more than one file might be produced + If WHOPR is used instead, more than one file might be produced ./ccXj2DTk.lto.ltrans.o ./ccCJuXGv.lto.ltrans.o */ @@ -304,6 +304,7 @@ run_gcc (unsigned argc, char *argv[]) bool seen_o = false; int parallel = 0; int jobserver = 0; + bool no_partition = false; /* Get the driver and options. */ collect_gcc = getenv ("COLLECT_GCC"); @@ -366,15 +367,16 @@ run_gcc (unsigned argc, char *argv[]) if (strcmp (option, "-v") == 0) verbose = 1; + if (strcmp (option, "-flto-partition=none") == 0) + no_partition = true; /* We've handled these LTO options, do not pass them on. */ - if (strcmp (option, "-flto") == 0) - lto_mode = LTO_MODE_LTO; - else if (strncmp (option, "-fwhopr", 7) == 0) + if (strncmp (option, "-flto=", 6) == 0 + || !strcmp (option, "-flto")) { lto_mode = LTO_MODE_WHOPR; - if (option[7] == '=') + if (option[5] == '=') { - if (!strcmp (option + 8, "jobserver")) + if (!strcmp (option + 6, "jobserver")) { jobserver = 1; parallel = 1; @@ -390,6 +392,12 @@ run_gcc (unsigned argc, char *argv[]) else *argv_ptr++ = option; } + if (no_partition) + { + lto_mode = LTO_MODE_LTO; + jobserver = 0; + parallel = 0; + } if (linker_output) { diff --git a/gcc/opts.c b/gcc/opts.c index 53ae5966047..085bc2502ff 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1218,7 +1218,7 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set) opts->x_flag_ipa_struct_reorg = 0; } - if (opts->x_flag_lto || opts->x_flag_whopr) + if (opts->x_flag_lto) { #ifdef ENABLE_LTO opts->x_flag_generate_lto = 1; @@ -1231,20 +1231,17 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set) error ("LTO support has not been enabled in this configuration"); #endif } - if (opts->x_flag_lto_partition_balanced || opts->x_flag_lto_partition_1to1) + if ((opts->x_flag_lto_partition_balanced != 0) + (opts->x_flag_lto_partition_1to1 != 0) + + (opts->x_flag_lto_partition_none != 0) >= 1) { - if (opts->x_flag_lto_partition_balanced - && opts->x_flag_lto_partition_1to1) + if ((opts->x_flag_lto_partition_balanced != 0) + + (opts->x_flag_lto_partition_1to1 != 0) + + (opts->x_flag_lto_partition_none != 0) > 1) error ("only one -flto-partition value can be specified"); - if (!opts->x_flag_whopr && !opts->x_flag_wpa && !opts->x_flag_ltrans) - error ("-flto-partition has no effect without -fwhopr"); + if (!opts->x_flag_lto && !opts->x_flag_wpa && !opts->x_flag_ltrans) + error ("-flto-partition has no effect without -flto"); } - /* Reconcile -flto and -fwhopr. Set additional flags as appropriate and - check option consistency. */ - if (opts->x_flag_lto && opts->x_flag_whopr) - error ("-flto and -fwhopr are mutually exclusive"); - /* We initialize opts->x_flag_split_stack to -1 so that targets can set a default value if they choose based on other options. */ if (opts->x_flag_split_stack == -1) @@ -2152,8 +2149,8 @@ common_handle_option (struct gcc_options *opts, dc->pedantic_errors = 1; break; - case OPT_fwhopr: - opts->x_flag_whopr = ""; + case OPT_flto: + opts->x_flag_lto = ""; break; case OPT_w: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 821ad573011..e67254d107d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,53 @@ +2010-11-11 Jan Hubicka + + * gcc.dg/20081223-1.c: Update LTO options. + * gcc.dg/lto/20090206-1_0.c: Update LTO options. + * gcc.dg/lto/20081118_0.c: Update LTO options. + * gcc.dg/lto/ipareference_0.c: Update LTO options. + * gcc.dg/lto/20100423-2_0.c: Update LTO options. + * gcc.dg/lto/20081201-1_0.c: Update LTO options. + * gcc.dg/lto/ipacp_0.c: Update LTO options. + * gcc.dg/lto/20090116_0.c: Update LTO options. + * gcc.dg/lto/20091015-1_0.c: Update LTO options. + * gcc.dg/lto/20090126-2_0.c: Update LTO options. + * gcc.dg/lto/20081202-2_0.c: Update LTO options. + * gcc.dg/lto/20081204-1_0.c: Update LTO options. + * gcc.dg/lto/const-uniq_0.c: Update LTO options. + * gcc.dg/lto/20081224_0.c: Update LTO options. + * gcc.dg/lto/20090219_0.c: Update LTO options. + * gcc.dg/lto/ipareference2_0.c: Update LTO options. + * gcc.dg/lto/20090206-2_0.c: Update LTO options. + * gcc.dg/lto/20081115_0.c: Update LTO options. + * gcc.dg/lto/20081201-2_0.c: Update LTO options. + * gcc.dg/lto/20081120-2_0.c: Update LTO options. + * gcc.dg/lto/materialize-1_0.c: Update LTO options. + * gcc.dg/lto/20090126-1_0.c: Update LTO options. + * gcc.dg/lto/20081202-1_0.c: Update LTO options. + * gcc.dg/lto/noreturn-1_0.c: Update LTO options. + * g++.dg/20090107-1.C: Update LTO options. + * g++.dg/lto/pr45679-2_0.C: Update LTO options. + * g++.dg/lto/20081123_0.C: Update LTO options. + * g++.dg/lto/20090313_0.C: Update LTO options. + * g++.dg/lto/20081125_0.C: Update LTO options. + * g++.dg/lto/20081109-1_0.C: Update LTO options. + * g++.dg/lto/20081219_0.C: Update LTO options. + * g++.dg/lto/20100724-1_0.C: Update LTO options. + * g++.dg/lto/20081204-1_0.C: Update LTO options. + * g++.dg/lto/20090303_0.C: Update LTO options. + * g++.dg/lto/20100723-1_0.C: Update LTO options. + * g++.dg/lto/pr45679-1_0.C: Update LTO options. + * g++.dg/lto/20090128_0.C: Update LTO options. + * g++.dg/lto/20081204-2_0.C: Update LTO options. + * g++.dg/lto/20090302_0.C: Update LTO options. + * g++.dg/lto/20081119-1_0.C: Update LTO options. + * g++.dg/lto/20081118_0.C: Update LTO options. + * g++.dg/20090121-1.C: Update LTO options. + * objc.dg/lto/lto.exp: Update LTO options. + * lib/lto.exp: Update LTO options. + * lib/gcc-dg.exp: Update LTO options. + * lib/c-torture.exp: Update LTO options. + * obj-c++.dg/lto/lto.exp: Update LTO options. + 2010-11-11 Jan Hubicka PR tree-optimize/40436 diff --git a/gcc/testsuite/g++.dg/20090107-1.C b/gcc/testsuite/g++.dg/20090107-1.C index 7c50675dbe0..ff586e81767 100644 --- a/gcc/testsuite/g++.dg/20090107-1.C +++ b/gcc/testsuite/g++.dg/20090107-1.C @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target lto } */ -/* { dg-options "-fwhopr -Wuninitialized -O1" } */ +/* { dg-options "-flto -Wuninitialized -O1" } */ template struct Q1 { typedef int x; }; template struct Q2 { diff --git a/gcc/testsuite/g++.dg/20090121-1.C b/gcc/testsuite/g++.dg/20090121-1.C index 9dff0f87af3..ddfa3ad057f 100644 --- a/gcc/testsuite/g++.dg/20090121-1.C +++ b/gcc/testsuite/g++.dg/20090121-1.C @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-require-effective-target lto } -// { dg-options "-fwhopr -Wuninitialized -O2" } +// { dg-options "-flto -Wuninitialized -O2" } class A { private: diff --git a/gcc/testsuite/g++.dg/lto/20081109-1_0.C b/gcc/testsuite/g++.dg/lto/20081109-1_0.C index 58be091ce16..474ceba79c9 100644 --- a/gcc/testsuite/g++.dg/lto/20081109-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20081109-1_0.C @@ -1,5 +1,5 @@ // { dg-lto-do link } -// { dg-lto-options {{-fPIC -fwhopr}} } -// { dg-extra-ld-options "-fPIC -fwhopr -r -nostdlib -fno-exceptions" } +// { dg-lto-options {{-fPIC -flto -flto-partition=1to1}} } +// { dg-extra-ld-options "-fPIC -flto -flto-partition=1to1 -r -nostdlib -fno-exceptions" } void func(); class Foo { }; void bar() { try { func(); } catch (Foo) { } }; diff --git a/gcc/testsuite/g++.dg/lto/20081118_0.C b/gcc/testsuite/g++.dg/lto/20081118_0.C index 5b5c82c5949..f11c76b67f5 100644 --- a/gcc/testsuite/g++.dg/lto/20081118_0.C +++ b/gcc/testsuite/g++.dg/lto/20081118_0.C @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fPIC -fwhopr -r -nostdlib}} } */ +/* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */ /* We used to ICE because of dangling pointers. */ diff --git a/gcc/testsuite/g++.dg/lto/20081119-1_0.C b/gcc/testsuite/g++.dg/lto/20081119-1_0.C index 5513db2f213..a2d5bd320a8 100644 --- a/gcc/testsuite/g++.dg/lto/20081119-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20081119-1_0.C @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fPIC -fwhopr -r -nostdlib}} } */ +/* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */ #include "20081119-1.h" diff --git a/gcc/testsuite/g++.dg/lto/20081123_0.C b/gcc/testsuite/g++.dg/lto/20081123_0.C index 3177063b504..8817be8f0a9 100644 --- a/gcc/testsuite/g++.dg/lto/20081123_0.C +++ b/gcc/testsuite/g++.dg/lto/20081123_0.C @@ -1,5 +1,5 @@ // { dg-lto-do link } -// { dg-lto-options {{-fwhopr -r -nostdlib -fPIC}} } +// { dg-lto-options {{-flto -flto-partition=1to1 -r -nostdlib -fPIC}} } int f(void) diff --git a/gcc/testsuite/g++.dg/lto/20081125_0.C b/gcc/testsuite/g++.dg/lto/20081125_0.C index ade9744946d..629c2b3d9d0 100644 --- a/gcc/testsuite/g++.dg/lto/20081125_0.C +++ b/gcc/testsuite/g++.dg/lto/20081125_0.C @@ -1,5 +1,5 @@ // { dg-lto-do link } -// { dg-lto-options {{-fwhopr}} } +// { dg-lto-options {{-flto -flto-partition=1to1}} } #include "20081125.h" object::object (int x) diff --git a/gcc/testsuite/g++.dg/lto/20081204-1_0.C b/gcc/testsuite/g++.dg/lto/20081204-1_0.C index a94b4823072..0d24878897f 100644 --- a/gcc/testsuite/g++.dg/lto/20081204-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20081204-1_0.C @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fwhopr -fPIC -r -nostdlib}} } */ +/* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */ /* Tests for the absence during linking of: lto1: error: type of '_ZTVN10__cxxabiv120__si_class_type_infoE' does diff --git a/gcc/testsuite/g++.dg/lto/20081204-2_0.C b/gcc/testsuite/g++.dg/lto/20081204-2_0.C index dfae081bfa1..81a42693c4f 100644 --- a/gcc/testsuite/g++.dg/lto/20081204-2_0.C +++ b/gcc/testsuite/g++.dg/lto/20081204-2_0.C @@ -1,5 +1,5 @@ // { dg-lto-do link } -// { dg-lto-options {{-fwhopr -O3}} } +// { dg-lto-options {{-flto -flto-partition=1to1 -O3}} } extern void foo (void); int diff --git a/gcc/testsuite/g++.dg/lto/20081219_0.C b/gcc/testsuite/g++.dg/lto/20081219_0.C index fd4c9738e1e..432a60c45f2 100644 --- a/gcc/testsuite/g++.dg/lto/20081219_0.C +++ b/gcc/testsuite/g++.dg/lto/20081219_0.C @@ -1,6 +1,6 @@ // { dg-lto-do link } -// { dg-lto-options {{-fPIC -fwhopr -O2}} } -// { dg-extra-ld-options "-O2 -fPIC -fwhopr -r -nostdlib" } +// { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -O2}} } +// { dg-extra-ld-options "-O2 -fPIC -flto -flto-partition=1to1 -r -nostdlib" } typedef long int ptrdiff_t; extern "C" diff --git a/gcc/testsuite/g++.dg/lto/20090128_0.C b/gcc/testsuite/g++.dg/lto/20090128_0.C index 24ff5970c12..d03cfc6a88c 100644 --- a/gcc/testsuite/g++.dg/lto/20090128_0.C +++ b/gcc/testsuite/g++.dg/lto/20090128_0.C @@ -1,5 +1,5 @@ // { dg-lto-do assemble } -// { dg-lto-options {{-fpreprocessed -O2 -fwhopr -funsigned-char}} } +// { dg-lto-options {{-fpreprocessed -O2 -flto -flto-partition=1to1 -funsigned-char}} } typedef unsigned char uint8; extern const uint8 array[256]; static inline bool diff --git a/gcc/testsuite/g++.dg/lto/20090302_0.C b/gcc/testsuite/g++.dg/lto/20090302_0.C index 21200a21124..76de7baf0fa 100644 --- a/gcc/testsuite/g++.dg/lto/20090302_0.C +++ b/gcc/testsuite/g++.dg/lto/20090302_0.C @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fPIC -fwhopr -r -nostdlib}} } */ +/* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */ struct Foo { bool Mumble(); static void Bar() { if (foo_->Mumble()) foo_ = 0; } diff --git a/gcc/testsuite/g++.dg/lto/20090303_0.C b/gcc/testsuite/g++.dg/lto/20090303_0.C index f6d5512e123..f2d112feda0 100644 --- a/gcc/testsuite/g++.dg/lto/20090303_0.C +++ b/gcc/testsuite/g++.dg/lto/20090303_0.C @@ -1,5 +1,5 @@ /* { dg-lto-do run } */ -/* { dg-lto-options {{-fwhopr -fPIC}} } */ +/* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */ /* { dg-suppress-ld-options {-fPIC} } */ void foobar(int *, int* __x) ; int test_ints[30]; diff --git a/gcc/testsuite/g++.dg/lto/20090313_0.C b/gcc/testsuite/g++.dg/lto/20090313_0.C index b000200c584..70029e65105 100644 --- a/gcc/testsuite/g++.dg/lto/20090313_0.C +++ b/gcc/testsuite/g++.dg/lto/20090313_0.C @@ -1,5 +1,5 @@ // { dg-lto-do link } -// { dg-lto-options {{-fwhopr -fPIC}} } -// { dg-extra-ld-options "-fwhopr -r -nostdlib" } +// { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } +// { dg-extra-ld-options "-flto -flto-partition=1to1 -r -nostdlib" } int X; diff --git a/gcc/testsuite/g++.dg/lto/20100723-1_0.C b/gcc/testsuite/g++.dg/lto/20100723-1_0.C index e8d3c8cd40b..d3996359377 100644 --- a/gcc/testsuite/g++.dg/lto/20100723-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20100723-1_0.C @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fcompare-debug -flto} {-fcompare-debug -fwhopr}} } */ +/* { dg-lto-options {{-fcompare-debug -flto -flto-partition=none} {-fcompare-debug -flto -flto-partition=1to1}} } */ struct S { virtual void f() { } diff --git a/gcc/testsuite/g++.dg/lto/20100724-1_0.C b/gcc/testsuite/g++.dg/lto/20100724-1_0.C index f652619ab07..084c07f0814 100644 --- a/gcc/testsuite/g++.dg/lto/20100724-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20100724-1_0.C @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-ftoplevel-reorder -flto} {-ftoplevel-reorder -fwhopr}} } */ +/* { dg-lto-options {{-ftoplevel-reorder -flto -flto-partition=none} {-ftoplevel-reorder -flto -flto-partition=1to1}} } */ /* { dg-extra-ld-options {-r -nostdlib} } */ struct Foo { virtual ~Foo(); }; diff --git a/gcc/testsuite/g++.dg/lto/pr45679-1_0.C b/gcc/testsuite/g++.dg/lto/pr45679-1_0.C index 05f7b550d4d..349f5c2c1ef 100644 --- a/gcc/testsuite/g++.dg/lto/pr45679-1_0.C +++ b/gcc/testsuite/g++.dg/lto/pr45679-1_0.C @@ -1,6 +1,6 @@ // { dg-lto-do link } // { dg-lto-options {{-O3 -Wno-multichar}} } -// { dg-extra-ld-options "-fwhopr -r -nostdlib" } +// { dg-extra-ld-options "-flto -flto-partition=1to1 -r -nostdlib" } extern "C" { typedef struct __locale_struct { diff --git a/gcc/testsuite/g++.dg/lto/pr45679-2_0.C b/gcc/testsuite/g++.dg/lto/pr45679-2_0.C index dcc53a63eb8..549741902ba 100644 --- a/gcc/testsuite/g++.dg/lto/pr45679-2_0.C +++ b/gcc/testsuite/g++.dg/lto/pr45679-2_0.C @@ -1,6 +1,6 @@ // { dg-lto-do link } // { dg-lto-options {{-O3 -Wno-multichar}} } -// { dg-extra-ld-options "-fwhopr -r -nostdlib" } +// { dg-extra-ld-options "-flto -flto-partition=1to1 -r -nostdlib" } extern "C" { typedef struct { union { diff --git a/gcc/testsuite/gcc.dg/20081223-1.c b/gcc/testsuite/gcc.dg/20081223-1.c index 3c36955c9e3..6bfbd17556f 100644 --- a/gcc/testsuite/gcc.dg/20081223-1.c +++ b/gcc/testsuite/gcc.dg/20081223-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fwhopr" { target lto } } */ +/* { dg-options "-flto" { target lto } } */ typedef struct foo_ foo_t; foo_t bar; /* { dg-error "storage size of 'bar' isn't known" } */ diff --git a/gcc/testsuite/gcc.dg/lto/20081115_0.c b/gcc/testsuite/gcc.dg/lto/20081115_0.c index f24a92deda4..c9f4c803f3a 100644 --- a/gcc/testsuite/gcc.dg/lto/20081115_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081115_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */ +/* { dg-lto-options {{-O2 -DOPTIMIZE -flto -flto-partition=1to1} {-O0 -flto -flto-partition=1to1}} } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/lto/20081118_0.c b/gcc/testsuite/gcc.dg/lto/20081118_0.c index 0640428be6d..b37eb31a46d 100644 --- a/gcc/testsuite/gcc.dg/lto/20081118_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081118_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */ +/* { dg-lto-options {{-O2 -DOPTIMIZE -flto -flto-partition=1to1} {-O0 -flto -flto-partition=1to1}} } */ extern void abort (void); extern int f (void); diff --git a/gcc/testsuite/gcc.dg/lto/20081120-2_0.c b/gcc/testsuite/gcc.dg/lto/20081120-2_0.c index 19c4ab34784..e2e11d64b63 100644 --- a/gcc/testsuite/gcc.dg/lto/20081120-2_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081120-2_0.c @@ -1,3 +1,3 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fwhopr -r -nostdlib}} } */ +/* { dg-lto-options {{-flto -flto-partition=1to1 -r -nostdlib}} } */ void bar(void) {} diff --git a/gcc/testsuite/gcc.dg/lto/20081201-1_0.c b/gcc/testsuite/gcc.dg/lto/20081201-1_0.c index 05cbb82fdd1..b6896446d7b 100644 --- a/gcc/testsuite/gcc.dg/lto/20081201-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081201-1_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */ +/* { dg-lto-options {{-O2 -DOPTIMIZE -flto -flto-partition=1to1} {-O0 -flto -flto-partition=1to1}} } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/lto/20081201-2_0.c b/gcc/testsuite/gcc.dg/lto/20081201-2_0.c index 4c1510d1cec..fd021eb1cd1 100644 --- a/gcc/testsuite/gcc.dg/lto/20081201-2_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081201-2_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{-O3 -fwhopr}} } */ +/* { dg-lto-options {{-O3 -flto -flto-partition=1to1}} } */ /* Test that cross-TU inlining works. */ diff --git a/gcc/testsuite/gcc.dg/lto/20081202-1_0.c b/gcc/testsuite/gcc.dg/lto/20081202-1_0.c index 933610a894b..1bdb91f8104 100644 --- a/gcc/testsuite/gcc.dg/lto/20081202-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081202-1_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{-fwhopr -O3}} } */ +/* { dg-lto-options {{-flto -flto-partition=1to1 -O3}} } */ extern void exit (int); extern void foo (void); diff --git a/gcc/testsuite/gcc.dg/lto/20081202-2_0.c b/gcc/testsuite/gcc.dg/lto/20081202-2_0.c index 09f417698ca..9d34f740b36 100644 --- a/gcc/testsuite/gcc.dg/lto/20081202-2_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081202-2_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{-fwhopr -O3}} } */ +/* { dg-lto-options {{-flto -flto-partition=1to1 -O3}} } */ extern void exit (int); extern void *foo (void); diff --git a/gcc/testsuite/gcc.dg/lto/20081204-1_0.c b/gcc/testsuite/gcc.dg/lto/20081204-1_0.c index 5952b07b76f..a4b25ff82fb 100644 --- a/gcc/testsuite/gcc.dg/lto/20081204-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081204-1_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fwhopr -fPIC -r -nostdlib}} } */ +/* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */ /* Tests for the absence during linking of: lto1: error: type of 'i' does not match original declaration */ diff --git a/gcc/testsuite/gcc.dg/lto/20081224_0.c b/gcc/testsuite/gcc.dg/lto/20081224_0.c index 9c784fe29ff..d050e231238 100644 --- a/gcc/testsuite/gcc.dg/lto/20081224_0.c +++ b/gcc/testsuite/gcc.dg/lto/20081224_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fwhopr -r -nostdlib -fPIC}} } */ +/* { dg-lto-options {{-flto -flto-partition=1to1 -r -nostdlib -fPIC}} } */ #include "20081224_0.h" extern struct foo x; diff --git a/gcc/testsuite/gcc.dg/lto/20090116_0.c b/gcc/testsuite/gcc.dg/lto/20090116_0.c index 9fd83ca0766..5bb3a919a59 100644 --- a/gcc/testsuite/gcc.dg/lto/20090116_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090116_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-O1 -fwhopr -fPIC}} } */ +/* { dg-lto-options {{-O1 -flto -flto-partition=1to1 -fPIC}} } */ /* { dg-extra-ld-options {-r -nostdlib -O0} } */ int foo(void) { diff --git a/gcc/testsuite/gcc.dg/lto/20090126-1_0.c b/gcc/testsuite/gcc.dg/lto/20090126-1_0.c index b2a25b2261c..01a12994021 100644 --- a/gcc/testsuite/gcc.dg/lto/20090126-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090126-1_0.c @@ -1,6 +1,6 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-O0 -fwhopr}} } */ -/* { dg-extra-ld-options {-r -nostdlib -O2 -fwhopr} } */ +/* { dg-lto-options {{-O0 -flto -flto-partition=1to1}} } */ +/* { dg-extra-ld-options {-r -nostdlib -O2 -flto -flto-partition=1to1} } */ int main(int argc, char **argv) { return 0; diff --git a/gcc/testsuite/gcc.dg/lto/20090126-2_0.c b/gcc/testsuite/gcc.dg/lto/20090126-2_0.c index a366c183873..2239412d1af 100644 --- a/gcc/testsuite/gcc.dg/lto/20090126-2_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090126-2_0.c @@ -1,6 +1,6 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fPIC -O2 -fwhopr}} } */ -/* { dg-extra-ld-options {-fno-PIC -r -nostdlib -O2 -fwhopr} } */ +/* { dg-lto-options {{-fPIC -O2 -flto -flto-partition=1to1}} } */ +/* { dg-extra-ld-options {-fno-PIC -r -nostdlib -O2 -flto -flto-partition=1to1} } */ int main(int argc, char **argv) { return 0; diff --git a/gcc/testsuite/gcc.dg/lto/20090206-1_0.c b/gcc/testsuite/gcc.dg/lto/20090206-1_0.c index 1fabb9192ce..c9fc97334c7 100644 --- a/gcc/testsuite/gcc.dg/lto/20090206-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090206-1_0.c @@ -1,6 +1,6 @@ /* { dg-lto-do link } */ /* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */ -/* { dg-lto-options {{-fPIC -r -nostdlib -fwhopr -msse2}} } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -flto -flto-partition=1to1 -msse2}} } */ /* { dg-require-effective-target sse2 } */ /* { dg-suppress-ld-options {-fPIC -msse2} } */ diff --git a/gcc/testsuite/gcc.dg/lto/20090206-2_0.c b/gcc/testsuite/gcc.dg/lto/20090206-2_0.c index 3e85c5d227c..4ca80ea4810 100644 --- a/gcc/testsuite/gcc.dg/lto/20090206-2_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090206-2_0.c @@ -1,6 +1,6 @@ /* { dg-lto-do link } */ /* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */ -/* { dg-lto-options {{-fwhopr -fPIC}} } */ +/* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */ /* { dg-suppress-ld-options {-fPIC} } */ void func(int n) { diff --git a/gcc/testsuite/gcc.dg/lto/20090219_0.c b/gcc/testsuite/gcc.dg/lto/20090219_0.c index b93dd1fe946..81a93e6da53 100644 --- a/gcc/testsuite/gcc.dg/lto/20090219_0.c +++ b/gcc/testsuite/gcc.dg/lto/20090219_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-O3 -fwhopr -fPIC -r -nostdlib}} } */ +/* { dg-lto-options {{-O3 -flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */ struct Foo { int f1, f2, f3, f4, f5; }; diff --git a/gcc/testsuite/gcc.dg/lto/20091015-1_0.c b/gcc/testsuite/gcc.dg/lto/20091015-1_0.c index d55ebcf4042..1cc4b78b31b 100644 --- a/gcc/testsuite/gcc.dg/lto/20091015-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20091015-1_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-fPIC -r -nostdlib -O2 -flto} {-fPIC -r -nostdlib -O2 -fwhopr}} } */ +/* { dg-lto-options {{-fPIC -r -nostdlib -O2 -flto} {-fPIC -r -nostdlib -O2 -flto -flto-partition=1to1}} } */ #include "20091015-1_b.h" void diagnostic_initialize (FILE **stream) { *stream = stderr; } diff --git a/gcc/testsuite/gcc.dg/lto/20100423-1_0.c b/gcc/testsuite/gcc.dg/lto/20100423-1_0.c index 58456d43b69..eb931651500 100644 --- a/gcc/testsuite/gcc.dg/lto/20100423-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20100423-1_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do run } */ -/* { dg-lto-options {{-O2 -flto}} } */ +/* { dg-lto-options {{-O2 -flto -flto-partition=none}} } */ struct bar {int x;}; extern struct bar foo(void); diff --git a/gcc/testsuite/gcc.dg/lto/20100423-2_0.c b/gcc/testsuite/gcc.dg/lto/20100423-2_0.c index 791b1bade7a..f546757c216 100644 --- a/gcc/testsuite/gcc.dg/lto/20100423-2_0.c +++ b/gcc/testsuite/gcc.dg/lto/20100423-2_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-lto-options {{-O2 -flto} {-O2 -fwhopr} {-O3 -flto} {-O3 -fwhopr}} } */ +/* { dg-lto-options {{-O2 -flto -flto-partition=none} {-O2 -flto -flto-partition=1to1} {-O3 -flto -flto-partition=none} {-O3 -flto -flto-partition=1to1}} } */ #include diff --git a/gcc/testsuite/gcc.dg/lto/const-uniq_0.c b/gcc/testsuite/gcc.dg/lto/const-uniq_0.c index 746167c6517..1bbc7f45f8d 100644 --- a/gcc/testsuite/gcc.dg/lto/const-uniq_0.c +++ b/gcc/testsuite/gcc.dg/lto/const-uniq_0.c @@ -1,7 +1,7 @@ /* The 3 constant initializers should be uniquized. */ /* { dg-lto-do run } */ -/* { dg-lto-options {{-Os -flto} {-Os -fwhopr} } } */ +/* { dg-lto-options {{-Os -flto -flto-partition=none} {-Os -flto -flto-partition=1to1} } } */ int lookup1 (int i) { diff --git a/gcc/testsuite/gcc.dg/lto/ipacp_0.c b/gcc/testsuite/gcc.dg/lto/ipacp_0.c index 3212261baa7..097c1c2538f 100644 --- a/gcc/testsuite/gcc.dg/lto/ipacp_0.c +++ b/gcc/testsuite/gcc.dg/lto/ipacp_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{ -O1 -fwhopr -fipa-cp -fipa-cp-clone}} } */ +/* { dg-lto-options {{ -O1 -flto -flto-partition=1to1 -fipa-cp -fipa-cp-clone}} } */ /* { dg-lto-do run } */ /* Test that clonning happens and we unify declarations of a from both units. */ diff --git a/gcc/testsuite/gcc.dg/lto/ipareference2_0.c b/gcc/testsuite/gcc.dg/lto/ipareference2_0.c index b7b13e6b9a4..f7ae0b4e316 100644 --- a/gcc/testsuite/gcc.dg/lto/ipareference2_0.c +++ b/gcc/testsuite/gcc.dg/lto/ipareference2_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{ -O1 -fwhopr -fwhole-program}} } */ +/* { dg-lto-options {{ -O1 -flto -flto-partition=1to1 -fwhole-program}} } */ /* { dg-lto-do run } */ /* Verify that ipa-reference marks A as constant and we fold references diff --git a/gcc/testsuite/gcc.dg/lto/ipareference_0.c b/gcc/testsuite/gcc.dg/lto/ipareference_0.c index c759b758e47..f8970f0e9ec 100644 --- a/gcc/testsuite/gcc.dg/lto/ipareference_0.c +++ b/gcc/testsuite/gcc.dg/lto/ipareference_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{ -O1 -fwhopr }} } */ +/* { dg-lto-options {{ -O1 -flto -flto-partition=1to1 }} } */ /* { dg-lto-do run } */ /* Test that ipa-reference notice that get_val will not change since do_nothing does not diff --git a/gcc/testsuite/gcc.dg/lto/materialize-1_0.c b/gcc/testsuite/gcc.dg/lto/materialize-1_0.c index 16c182fc1cd..1751d65d293 100644 --- a/gcc/testsuite/gcc.dg/lto/materialize-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/materialize-1_0.c @@ -1,4 +1,4 @@ -/* { dg-lto-options {{ -O3 -fwhopr}} } */ +/* { dg-lto-options {{ -O3 -flto -flto-partition=1to1}} } */ /* { dg-lto-do run } */ extern void clone_me (int, int); int a=15; diff --git a/gcc/testsuite/gcc.dg/lto/noreturn-1_0.c b/gcc/testsuite/gcc.dg/lto/noreturn-1_0.c index f10081abf1b..7f493cd9f9c 100644 --- a/gcc/testsuite/gcc.dg/lto/noreturn-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/noreturn-1_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do run } */ -/* { dg-lto-options {{-O2 -fwhopr} } } */ +/* { dg-lto-options {{-O2 -flto -flto-partition=1to1} } } */ void exit (int); __attribute__ ((noreturn)) diff --git a/gcc/testsuite/lib/c-torture.exp b/gcc/testsuite/lib/c-torture.exp index 8b15b577005..551de7d3d7e 100644 --- a/gcc/testsuite/lib/c-torture.exp +++ b/gcc/testsuite/lib/c-torture.exp @@ -53,8 +53,8 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] { set LTO_TORTURE_OPTIONS "" if [check_effective_target_lto] { set LTO_TORTURE_OPTIONS [list \ - { -O2 -flto } \ - { -O2 -fwhopr } + { -O2 -flto -flto-partition=none } \ + { -O2 -flto } ] } diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index e52a23fe0d4..4cdfa3e0251 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -70,8 +70,8 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] { set LTO_TORTURE_OPTIONS "" if [check_effective_target_lto] { set LTO_TORTURE_OPTIONS [list \ - { -O2 -flto } \ - { -O2 -fwhopr } + { -O2 -flto -flto-partition=none } \ + { -O2 -flto } ] } diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp index 36bc72a850e..f4469eefbab 100644 --- a/gcc/testsuite/lib/lto.exp +++ b/gcc/testsuite/lib/lto.exp @@ -64,8 +64,10 @@ proc lto_init { args } { # add it to site.exp directly. if ![info exists LTO_OPTIONS] { set LTO_OPTIONS [list \ - {-O0 -fwhopr} \ - {-O2 -fwhopr} \ + {-O0 -flto -flto-partition=none } \ + {-O2 -flto -flto-partition=none } \ + {-O0 -flto -flto-partition=1to1 } \ + {-O2 -flto -flto-partition=1to1 } \ {-O0 -flto} \ {-O2 -flto} \ ] diff --git a/gcc/testsuite/obj-c++.dg/lto/lto.exp b/gcc/testsuite/obj-c++.dg/lto/lto.exp index 291895ffc01..4ae08c17277 100644 --- a/gcc/testsuite/obj-c++.dg/lto/lto.exp +++ b/gcc/testsuite/obj-c++.dg/lto/lto.exp @@ -41,10 +41,10 @@ if { ![check_effective_target_lto] } { global LTO_OPTIONS set LTO_OPTIONS [list \ - {-O0 -fwhopr -fgnu-runtime} \ - {-O2 -fwhopr -fgnu-runtime} \ - {-O0 -flto -fgnu-runtime} \ + {-O0 -flto -fgnu-runtime} \ {-O2 -flto -fgnu-runtime} \ + {-O0 -flto -flto-partition=none -fgnu-runtime} \ + {-O2 -flto -flto-partition=none -fgnu-runtime} \ ] obj-c++_init @@ -67,10 +67,10 @@ foreach src $tests { # darwin targets can also run code with the NeXT runtime. if [istarget "*-*-darwin*" ] { set LTO_OPTIONS [list \ - {-O0 -fwhopr -fnext-runtime} \ - {-O2 -fwhopr -fnext-runtime} \ - {-O0 -flto -fnext-runtime} \ + {-O0 -flto -fnext-runtime} \ {-O2 -flto -fnext-runtime} \ + {-O0 -flto -flto-partition=none -fnext-runtime} \ + {-O2 -flto -flto-partition=none -fnext-runtime} \ ] foreach src $tests { # If we're only testing specific files and this isn't one of them, skip it. diff --git a/gcc/testsuite/objc.dg/lto/lto.exp b/gcc/testsuite/objc.dg/lto/lto.exp index 4ea89cced6c..f567cd93e2b 100644 --- a/gcc/testsuite/objc.dg/lto/lto.exp +++ b/gcc/testsuite/objc.dg/lto/lto.exp @@ -41,10 +41,10 @@ if { ![check_effective_target_lto] } { global LTO_OPTIONS set LTO_OPTIONS [list \ - {-O0 -fwhopr -fgnu-runtime} \ - {-O2 -fwhopr -fgnu-runtime} \ - {-O0 -flto -fgnu-runtime} \ + {-O0 -flto -fgnu-runtime} \ {-O2 -flto -fgnu-runtime} \ + {-O0 -flto -flto-partition=none -fgnu-runtime} \ + {-O2 -flto -flto-partition=none -fgnu-runtime} \ ] objc_init @@ -67,10 +67,10 @@ foreach src $tests { # darwin targets can also run code with the NeXT runtime. if [istarget "*-*-darwin*" ] { set LTO_OPTIONS [list \ - {-O0 -fwhopr -fnext-runtime} \ - {-O2 -fwhopr -fnext-runtime} \ - {-O0 -flto -fnext-runtime} \ + {-O0 -flto -fnext-runtime} \ {-O2 -flto -fnext-runtime} \ + {-O0 -flto -flto-partition=none -fnext-runtime} \ + {-O2 -flto -flto-partition=none -fnext-runtime} \ ] foreach src $tests { # If we're only testing specific files and this isn't one of them, skip it. diff --git a/gcc/varpool.c b/gcc/varpool.c index ff3631b3478..2a96d796b5e 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -343,7 +343,6 @@ decide_is_variable_needed (struct varpool_node *node, tree decl) if (TREE_PUBLIC (decl) && !flag_whole_program && !flag_lto - && !flag_whopr && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl)) return true;