]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* doc/invoke.texi (-fwhopr): Merge into -flto section.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Nov 2010 22:54:53 +0000 (22:54 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Nov 2010 22:54:53 +0000 (22:54 +0000)
(-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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166625 138bc75d-0d04-0410-961f-82ee72b054a4

61 files changed:
gcc/ChangeLog
gcc/cgraphunit.c
gcc/collect2.c
gcc/common.opt
gcc/doc/invoke.texi
gcc/gcc.c
gcc/ipa-prop.c
gcc/ipa-split.c
gcc/ipa.c
gcc/lto-wrapper.c
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/20090107-1.C
gcc/testsuite/g++.dg/20090121-1.C
gcc/testsuite/g++.dg/lto/20081109-1_0.C
gcc/testsuite/g++.dg/lto/20081118_0.C
gcc/testsuite/g++.dg/lto/20081119-1_0.C
gcc/testsuite/g++.dg/lto/20081123_0.C
gcc/testsuite/g++.dg/lto/20081125_0.C
gcc/testsuite/g++.dg/lto/20081204-1_0.C
gcc/testsuite/g++.dg/lto/20081204-2_0.C
gcc/testsuite/g++.dg/lto/20081219_0.C
gcc/testsuite/g++.dg/lto/20090128_0.C
gcc/testsuite/g++.dg/lto/20090302_0.C
gcc/testsuite/g++.dg/lto/20090303_0.C
gcc/testsuite/g++.dg/lto/20090313_0.C
gcc/testsuite/g++.dg/lto/20100723-1_0.C
gcc/testsuite/g++.dg/lto/20100724-1_0.C
gcc/testsuite/g++.dg/lto/pr45679-1_0.C
gcc/testsuite/g++.dg/lto/pr45679-2_0.C
gcc/testsuite/gcc.dg/20081223-1.c
gcc/testsuite/gcc.dg/lto/20081115_0.c
gcc/testsuite/gcc.dg/lto/20081118_0.c
gcc/testsuite/gcc.dg/lto/20081120-2_0.c
gcc/testsuite/gcc.dg/lto/20081201-1_0.c
gcc/testsuite/gcc.dg/lto/20081201-2_0.c
gcc/testsuite/gcc.dg/lto/20081202-1_0.c
gcc/testsuite/gcc.dg/lto/20081202-2_0.c
gcc/testsuite/gcc.dg/lto/20081204-1_0.c
gcc/testsuite/gcc.dg/lto/20081224_0.c
gcc/testsuite/gcc.dg/lto/20090116_0.c
gcc/testsuite/gcc.dg/lto/20090126-1_0.c
gcc/testsuite/gcc.dg/lto/20090126-2_0.c
gcc/testsuite/gcc.dg/lto/20090206-1_0.c
gcc/testsuite/gcc.dg/lto/20090206-2_0.c
gcc/testsuite/gcc.dg/lto/20090219_0.c
gcc/testsuite/gcc.dg/lto/20091015-1_0.c
gcc/testsuite/gcc.dg/lto/20100423-1_0.c
gcc/testsuite/gcc.dg/lto/20100423-2_0.c
gcc/testsuite/gcc.dg/lto/const-uniq_0.c
gcc/testsuite/gcc.dg/lto/ipacp_0.c
gcc/testsuite/gcc.dg/lto/ipareference2_0.c
gcc/testsuite/gcc.dg/lto/ipareference_0.c
gcc/testsuite/gcc.dg/lto/materialize-1_0.c
gcc/testsuite/gcc.dg/lto/noreturn-1_0.c
gcc/testsuite/lib/c-torture.exp
gcc/testsuite/lib/gcc-dg.exp
gcc/testsuite/lib/lto.exp
gcc/testsuite/obj-c++.dg/lto/lto.exp
gcc/testsuite/objc.dg/lto/lto.exp
gcc/varpool.c

index 8ae4ecb822348cc50839d627a944ceaddd4e1017..d5e85a28186cadae44cef5ea3571e111a5f10425 100644 (file)
@@ -1,3 +1,20 @@
+2010-11-11  Jan Hubicka  <jh@suse.cz>
+
+       * 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  <jh@suse.cz>
 
        PR tree-optimize/40436
index c2d2fed9b1dbc3b212350b1638b276963e5bc99d..f98243955b777a04a05450f72e4129e03594644c 100644 (file)
@@ -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;
 
index 37a535ba1a4ee23cafc4c50bd6af845521f7b248..0d745ae0b8d8cfe05c6ca0a2c5a920a55c4f64ba 100644 (file)
@@ -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. */
index 71f45783b80a3bdaa6a6494f77e6c5b757772e5b..85eaa37bff347d8136edcb4cad1b0e288790dc03 100644 (file)
@@ -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
index f19748391f669e662ebdaa6acd70bd275df72d25..f2deda3e21a774abc04574a4808e91e625a0b179 100644 (file)
@@ -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
index 5884f381772e038c5db239b9a09cd9d26779d517..fcb8a59f471a8b7fecfc7e80072bd557092a5aa4 100644 (file)
--- 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:%<fcompare-debug*} %{fwhopr*:%<fcompare-debug*} \
-    %{flto} %{fwhopr*} %l " LINK_PIE_SPEC \
+    %{flto*:%<fcompare-debug*} \
+    %{flto*} %l " LINK_PIE_SPEC \
    "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
     %{s} %{t} %{u*} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
     %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
index d0587b6fb5e36f61f2f012e1399a0ed1cbd422f3..473f483ad3dc38fc0d201071ab6900c0b4d7aecc 100644 (file)
@@ -890,7 +890,7 @@ ipa_compute_jump_functions (struct cgraph_node *node,
     {
       /* We do not need to bother analyzing calls to unknown
         functions unless they may become known during lto/whopr.  */
-      if (!cs->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
index e46d270ec7e988edba8e4e485a895f19ab434c37..1a5535221531a67e0ff6f1019ac196cc2d0f93af 100644 (file)
@@ -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 "
index 7c2c7f23baf5efcb4d51e15edf8d75d7975353e7..1dd85f80c36485f538307c424ec9ba99c6882188 100644 (file)
--- 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 =
index 540101773ef23c1fc232379470901f2d3817bf50..dea51b07c7379fe8a0b96b2f8f5645a9f2d9efad 100644 (file)
@@ -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)
     {
index 53ae59660478cf2229e8db424d34c3fd9c6ed4b1..085bc2502ff493beb82ea0d9b970c48545822a42 100644 (file)
@@ -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:
index 821ad573011a0cd47a2706b554a23c22dfc579fd..e67254d107db4281dfff2279fceddd0cbfaf98c1 100644 (file)
@@ -1,3 +1,53 @@
+2010-11-11  Jan Hubicka  <jh@suse.cz>
+
+       * 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  <jh@suse.cz>
 
        PR tree-optimize/40436
index 7c50675dbe0d76da40f193b9490b8103491be64f..ff586e8176743be18f5e7bbd1abf55133e4017e5 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target lto } */
-/* { dg-options "-fwhopr -Wuninitialized -O1" }  */
+/* { dg-options "-flto -Wuninitialized -O1" }  */
 
 template <typename T> struct Q1 { typedef int x; };
 template <typename T> struct Q2 {
index 9dff0f87af38fbccb3f0c5a49d12cba986759526..ddfa3ad057ffda4d4ca85ccc2d4dd64890325540 100644 (file)
@@ -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:
index 58be091ce16eff8205f29d5eee21be7858d0458f..474ceba79c97ccaaa070e114993550a450bc13f3 100644 (file)
@@ -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) { } };
index 5b5c82c5949aac26d875feccb6a9c164ed9c17b6..f11c76b67f5b4c4e7eca142f18a98dcde1f442ba 100644 (file)
@@ -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.  */
 
index 5513db2f213a14e10033b4ed0ec6c23f211e2f34..a2d5bd320a86750854ddabdff49726502e92e887 100644 (file)
@@ -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"
 
index 3177063b504720c0da117df285931ddbfc937c0b..8817be8f0a93617742be08388838435ba9436d2e 100644 (file)
@@ -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)
index ade9744946d1ce8c4637e7f4563cac08c47ac89c..629c2b3d9d0e3a83905f65989342dbb18cb3fe2a 100644 (file)
@@ -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)
index a94b4823072aa7ddf57021ba365bfaaa9a347876..0d24878897f1f3f51b09abb93e1c263e318f7960 100644 (file)
@@ -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
index dfae081bfa16e545b52b316ea4376bd6838f9dc3..81a42693c4f18daf93c2cb63baa60792e63ad31b 100644 (file)
@@ -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
index fd4c9738e1e3a85ae3946395cef5da3bfac6eedd..432a60c45f2dc97979507cb71ce20f37e4d19398 100644 (file)
@@ -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"
index 24ff5970c1207c5d9f9ee26ce24d7dd42602ec4c..d03cfc6a88ca8c9ea37bc4e134dc8922b6ec2569 100644 (file)
@@ -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
index 21200a211243fa1e59c985bf6f9e1468f5ebb5ad..76de7baf0fa6231e0b9c700341a1bddb5ef5894d 100644 (file)
@@ -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; }
index f6d5512e12397569e4a57d870901f8d084f2fd87..f2d112feda0fd82c99368aa7946fb054247cde96 100644 (file)
@@ -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];
index b000200c584e1c51584f397f01dd3e239b97f9ad..70029e6510530d04da786e7813fd39c74447e012 100644 (file)
@@ -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;
index e8d3c8cd40b821c1191787e73acf3d15d6b34ac3..d39963593774bc0644b5d6a1f617e6341fc060ef 100644 (file)
@@ -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() { }
index f652619ab07d6e9f0b09ba7eeb2a53de9c145fad..084c07f0814d26d70f53acdd621e3e3aa3bb534b 100644 (file)
@@ -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(); };
index 05f7b550d4d9cd74fd900b2538d5994f004a0400..349f5c2c1ef77b564496b4157a406708fba42e1d 100644 (file)
@@ -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 {
index dcc53a63eb86a74be0fe40c9567bfb2b50e63d89..549741902baa78959798124ffa0a92f855628448 100644 (file)
@@ -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   {
index 3c36955c9e3650f5238ef44c1bb5556cdb9e8b4f..6bfbd17556f01a6a6491480680f28afe1e2f481d 100644 (file)
@@ -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" }  */
index f24a92deda401635b2c26a26a4dcc6bc20da0778..c9f4c803f3a8c9784b381a6f0cb0c887b38af10e 100644 (file)
@@ -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);
 
index 0640428be6d7ff3f6cfcc293e8d7590c2b92517f..b37eb31a46db1177e1bd2f45cde15f9803e7831c 100644 (file)
@@ -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);
index 19c4ab347841c0738db1bf3c2207add14516950f..e2e11d64b6364a731a6ce825feec5c49f100d2ec 100644 (file)
@@ -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) {}
index 05cbb82fdd12b101c0d8a65ab405f9050e4d9a0f..b6896446d7b8f0cab72ca012b304f59dd4f60548 100644 (file)
@@ -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);
 
index 4c1510d1cec2529dde95d5833c63d84007331c08..fd021eb1cd15cd9984e3f091dc2725c0278e9b8f 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-lto-options {{-O3 -fwhopr}} } */
+/* { dg-lto-options {{-O3 -flto -flto-partition=1to1}} } */
 
 /* Test that cross-TU inlining works.  */
 
index 933610a894bc537e2e8d106441734facbd096713..1bdb91f8104755ea5b07e1e018cb4680abd6ff59 100644 (file)
@@ -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);
index 09f417698ca6d1181315b7446bcd4af74093a513..9d34f740b362030640ced29fdaaefb210c98d179 100644 (file)
@@ -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);
index 5952b07b76fda9d013fb956cfc49d1247fd1f47f..a4b25ff82fb623593c5f9310420395aaf15734b4 100644 (file)
@@ -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  */
index 9c784fe29ffc4acc477c8d9c6abe9407ddf2c596..d050e23123892634527120c0abc8dfbe5428f2c2 100644 (file)
@@ -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;
index 9fd83ca07660bf88fbc73cd5a87534e3d8fcf899..5bb3a919a599056a253a0aed7ace60fc55a4f77f 100644 (file)
@@ -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) {
index b2a25b2261c32821feeeda33770b0d451b943209..01a12994021836cb4b9ccc424f5a7a5d9ec85477 100644 (file)
@@ -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;
index a366c183873c6e5700b17065e8e333cd6788e77e..2239412d1af028b44360c2f8d6d2fdeeb2cc6a17 100644 (file)
@@ -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;
index 1fabb9192ce7fd878ee5c1162b776c9fd8ba1244..c9fc97334c758693ed15970c9112660febb286fa 100644 (file)
@@ -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} } */
 
index 3e85c5d227c66663b951f299179b45d413232bff..4ca80ea4810913cafc91d05f19a2689a106d5d1b 100644 (file)
@@ -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) {
index b93dd1fe946ee9f995964c7c34d1af47ce912acb..81a93e6da53ff23d1232ec09174518bd2d9ea337 100644 (file)
@@ -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; };
 
index d55ebcf40425c2d6830fbcee553b3de3e3bcd8bb..1cc4b78b31b2305df7ae9c26f99f4b7e589ab03a 100644 (file)
@@ -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; }
index 58456d43b69390f9d6fa6df2ccc7d6a3194b3e65..eb9316515005fcca58d669da22bc9eb645a98346 100644 (file)
@@ -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);
index 791b1bade7a4b2b1deeaf4343c27bfc7994d4b17..f546757c2168e886bcc32f876c05c1e665d9f9e8 100644 (file)
@@ -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 <stdio.h>
 
index 746167c6517c1b8ca2f225d14b0f7e689855e020..1bbc7f45f8d42aef706a006c66132003745cb01b 100644 (file)
@@ -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)
 {
index 3212261baa785b42f14d528bba4eed5813378c89..097c1c2538f78506d83d927ae48a7c8409113cce 100644 (file)
@@ -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.  */
index b7b13e6b9a4016ef66d371a2702c0cb95ec90d95..f7ae0b4e3163848d5f79d1472c92703d1f971506 100644 (file)
@@ -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
index c759b758e4730d9573ade803e34c743d143e7d2e..f8970f0e9ece673a6a62265f720128f9661a6142 100644 (file)
@@ -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
index 16c182fc1cd973fe39c186ad09563c145cc5b8b8..1751d65d293ce1123388a1e14d817e5c9681b909 100644 (file)
@@ -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;
index f10081abf1bc20bdd1ae7fbadf5ec388eb509189..7f493cd9f9cce72ebb72167a29390adbae253819 100644 (file)
@@ -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))
index 8b15b577005bd501757b60719ac1ad86dadb64cd..551de7d3d7e146edcff84589fff91858158001a1 100644 (file)
@@ -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 }
     ]
 }
 
index e52a23fe0d465564cead63b2ed4beb2ad7fff978..4cdfa3e0251f65accfe0a0fa20f6ed05e2a22c5d 100644 (file)
@@ -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 }
     ]
 }
 
index 36bc72a850eea5245a9fce597b76edc2990633ff..f4469eefbab5d67af629ab1459ae03dbdb86daaf 100644 (file)
@@ -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}         \
        ]
index 291895ffc01328d2f62d20b1c5e2a35689d47ed7..4ae08c17277834deefcc275787e13f54e029f837 100644 (file)
@@ -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.
index 4ea89cced6ca44eb0440c2528c0280ace6e88059..f567cd93e2b291557d2dded3a6ef74d32cab257c 100644 (file)
@@ -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.
index ff3631b3478361c2da7edd2bb092d0f70725f0cb..2a96d796b5e8e7eb0457c3458886ddb9c350ff01 100644 (file)
@@ -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;