This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fwhopr and -flto options reorg


> 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.

It documents couple paragraphs later (the part that is left there from
origin-fwhopr description).
>
>>    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?

The idea was to keep internal handling unchanged and update it incrementally,
but I can melt this into the patch, too.  There are only 9 occurences of
flag_whopr.
>
>
>> ***************
>> *** 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?

I added it to multiple file testcases that was engineered to.  I am trying to keep default to be
-flto as after all we want best testing coverage on -flto.
>
>
>> --- 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?
Ah yes, removed from my local copy.

Honza
>
>
> Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]