This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -fwhopr and -flto options reorg
- From: Diego Novillo <dnovillo at google dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Thu, 11 Nov 2010 13:19:56 -0500
- Subject: Re: -fwhopr and -flto options reorg
- References: <20101111180115.GE2722@kam.mff.cuni.cz>
On 10-11-11 13:01 , Jan Hubicka wrote:
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[=@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
This should document what the valid values of @var{n} are.
extern int flag_dump_rtl_in_asm;
+
+ /* WHOPR mode. */
+ extern bool flag_whopr;
Why do we need this? Isn't everything we need to know encoded in
flag_lto_partition?
***************
*** 1,5 ****
/* { dg-do compile } */
! /* { dg-options "-fwhopr" { target lto } } */
typedef struct foo_ foo_t;
foo_t bar; /* { dg-error "storage size of 'bar' isn't known" } */
--- 1,5 ----
/* { dg-do compile } */
! /* { dg-options "-flto" { target lto } } */
I don't think it matters much, but this test was originally for whopr
mode. Add -flto-partition=1to1 here?
--- 1218,1224 ----
opts->x_flag_ipa_struct_reorg = 0;
}
! if (flag_whopr || opts->x_flag_lto)
So here, flag_whopr would be 'flag_lto_partition == none'
+ freorder-functions
+ Common Report Var(flag_ipa_reorder) Init(1) Optimization
+ Reroder functions for better locality at execution time
+
Unrelated change?
Diego.