public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* doubt related to O3 optimization
@ 2020-11-10 19:18 Ezhil P
  2020-11-10 20:26 ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Ezhil P @ 2020-11-10 19:18 UTC (permalink / raw)
  To: gcc-help

hi,
came across this in website

*https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html*
<https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html>

.............................................................................................................

-fprofile-use

-fprofile-use=*path*

Enable profile feedback-directed optimizations, and the following
optimizations, *many of which are generally profitable only with profile
feedback available: *

-fbranch-probabilities  -fprofile-values

-funroll-loops  -fpeel-loops  -ftracer  -fvpt

-finline-functions  -fipa-cp  -fipa-cp-clone  -fipa-bit-cp

-fpredictive-commoning  -fsplit-loops  -funswitch-loops

-fgcse-after-reload  -ftree-loop-vectorize  -ftree-slp-vectorize

-fvect-cost-model=dynamic  -ftree-loop-distribute-patterns

-fprofile-reorder-functions

.........................................................................................................


O3 optimization uses most of these flags.


Since it has been mentioned as above I assumed that some optimization flags
specified here cannot function without profile info.


Can you please clarify whether the flags mentioned above can function
without using profile information by just specifying O3?


Thank you





-- 
P.Ezhil,
Asst Prof,
L.N GOVERNMENT COLLEGE,
PONNERI - 601204

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: doubt related to O3 optimization
  2020-11-10 19:18 doubt related to O3 optimization Ezhil P
@ 2020-11-10 20:26 ` Jonathan Wakely
  2020-11-11 15:36   ` Ezhil P
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2020-11-10 20:26 UTC (permalink / raw)
  To: Ezhil P; +Cc: gcc-help

On Tue, 10 Nov 2020, 19:20 Ezhil P via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> hi,
> came across this in website
>
> *https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html*
> <https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html>
>
>
> .............................................................................................................
>
> -fprofile-use
>
> -fprofile-use=*path*
>
> Enable profile feedback-directed optimizations, and the following
> optimizations, *many of which are generally profitable only with profile
> feedback available: *
>
> -fbranch-probabilities  -fprofile-values
>
> -funroll-loops  -fpeel-loops  -ftracer  -fvpt
>
> -finline-functions  -fipa-cp  -fipa-cp-clone  -fipa-bit-cp
>
> -fpredictive-commoning  -fsplit-loops  -funswitch-loops
>
> -fgcse-after-reload  -ftree-loop-vectorize  -ftree-slp-vectorize
>
> -fvect-cost-model=dynamic  -ftree-loop-distribute-patterns
>
> -fprofile-reorder-functions
>
>
> .........................................................................................................
>
>
> O3 optimization uses most of these flags.
>
>
> Since it has been mentioned as above I assumed that some optimization flags
> specified here cannot function without profile info.
>


No, that's not what it says.


>
> Can you please clarify whether the flags mentioned above can function
> without using profile information by just specifying O3?
>


Some of them work much better with profile information, but some work OK
even without profile information.

The text you quoted above doesn't say they don't function, it says they
don't function **well**. And it doesn't say that is true for all of them.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: doubt related to O3 optimization
  2020-11-10 20:26 ` Jonathan Wakely
@ 2020-11-11 15:36   ` Ezhil P
  0 siblings, 0 replies; 6+ messages in thread
From: Ezhil P @ 2020-11-11 15:36 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Thank you for the clarification.

On Wed 11 Nov, 2020, 1:57 AM Jonathan Wakely, <jwakely.gcc@gmail.com> wrote:

>
>
> On Tue, 10 Nov 2020, 19:20 Ezhil P via Gcc-help, <gcc-help@gcc.gnu.org>
> wrote:
>
>> hi,
>> came across this in website
>>
>> *https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html*
>> <https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html>
>>
>>
>> .............................................................................................................
>>
>> -fprofile-use
>>
>> -fprofile-use=*path*
>>
>> Enable profile feedback-directed optimizations, and the following
>> optimizations, *many of which are generally profitable only with profile
>> feedback available: *
>>
>> -fbranch-probabilities  -fprofile-values
>>
>> -funroll-loops  -fpeel-loops  -ftracer  -fvpt
>>
>> -finline-functions  -fipa-cp  -fipa-cp-clone  -fipa-bit-cp
>>
>> -fpredictive-commoning  -fsplit-loops  -funswitch-loops
>>
>> -fgcse-after-reload  -ftree-loop-vectorize  -ftree-slp-vectorize
>>
>> -fvect-cost-model=dynamic  -ftree-loop-distribute-patterns
>>
>> -fprofile-reorder-functions
>>
>>
>> .........................................................................................................
>>
>>
>> O3 optimization uses most of these flags.
>>
>>
>> Since it has been mentioned as above I assumed that some optimization
>> flags
>> specified here cannot function without profile info.
>>
>
>
> No, that's not what it says.
>
>
>>
>> Can you please clarify whether the flags mentioned above can function
>> without using profile information by just specifying O3?
>>
>
>
> Some of them work much better with profile information, but some work OK
> even without profile information.
>
> The text you quoted above doesn't say they don't function, it says they
> don't function **well**. And it doesn't say that is true for all of them.
>
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Doubt related to O3 optimization
  2020-11-10 10:44 ` Jonathan Wakely
@ 2020-11-10 12:04   ` Ezhil P
  0 siblings, 0 replies; 6+ messages in thread
From: Ezhil P @ 2020-11-10 12:04 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Hi,
Thank you for the clarification.
I never expected such a quick response.


On Tue, Nov 10, 2020 at 4:14 PM Jonathan Wakely <jwakely.gcc@gmail.com>
wrote:

> On Tue, 10 Nov 2020 at 04:14, Ezhil P via Gcc-help <gcc-help@gcc.gnu.org>
> wrote:
> >
> > hi,
> > Have a great day
> > In GCC does optimization levels O2 and O3 use profile information by
> > default without specifying -fprofile options explicitly?
>
> No.
>
> > Because O3 uses
> > flags like -fipa-cp-clone which actually require profile information.
>
> I don't think it requires it. It works better with profile info, but
> doesn't require it.
>
> > If so , where are the data files related to profile information stored
> for
> > reference?
>
> They're not, because profile info is not used unless enabled explicitly.
>


-- 
P.Ezhil,
Asst Prof,
L.N GOVERNMENT COLLEGE,
PONNERI - 601204

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Doubt related to O3 optimization
  2020-11-10  4:12 Doubt " Ezhil P
@ 2020-11-10 10:44 ` Jonathan Wakely
  2020-11-10 12:04   ` Ezhil P
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2020-11-10 10:44 UTC (permalink / raw)
  To: Ezhil P; +Cc: gcc-help

On Tue, 10 Nov 2020 at 04:14, Ezhil P via Gcc-help <gcc-help@gcc.gnu.org> wrote:
>
> hi,
> Have a great day
> In GCC does optimization levels O2 and O3 use profile information by
> default without specifying -fprofile options explicitly?

No.

> Because O3 uses
> flags like -fipa-cp-clone which actually require profile information.

I don't think it requires it. It works better with profile info, but
doesn't require it.

> If so , where are the data files related to profile information stored for
> reference?

They're not, because profile info is not used unless enabled explicitly.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Doubt related to O3 optimization
@ 2020-11-10  4:12 Ezhil P
  2020-11-10 10:44 ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Ezhil P @ 2020-11-10  4:12 UTC (permalink / raw)
  To: gcc-help

hi,
Have a great day
In GCC does optimization levels O2 and O3 use profile information by
default without specifying -fprofile options explicitly? Because O3 uses
flags like -fipa-cp-clone which actually require profile information.
If so , where are the data files related to profile information stored for
reference?
thank you

-- 
P.Ezhil,
Asst Prof,
L.N GOVERNMENT COLLEGE,
PONNERI - 601204

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-11 15:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 19:18 doubt related to O3 optimization Ezhil P
2020-11-10 20:26 ` Jonathan Wakely
2020-11-11 15:36   ` Ezhil P
  -- strict thread matches above, loose matches on Subject: below --
2020-11-10  4:12 Doubt " Ezhil P
2020-11-10 10:44 ` Jonathan Wakely
2020-11-10 12:04   ` Ezhil P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).