This is the mail archive of the gcc-help@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: loop unrolling, flags and passes


Thanks for the response but I still didnt got the answer regarding
whether it is possible to do loop unrolling without using -O1, -O2 or
-O3. What exactly are those flags (along with funroll-all-loops) which
makes loops unroll?

Best regards

Memon

On Mon, Dec 13, 2010 at 2:46 AM, Kevin P. Fleming <kpfleming@digium.com> wrote:
> On 12/12/2010 06:08 PM, Abdul Wahid Memon wrote:
>>
>> Hello everyone
>>
>> I have few questions regarding loop unrolling and the effect of flags
>> (provided at command line) on the execution of passes.
>>
>> Is it possible to do loop unrolling without using -O3, -O2 and -O1?
>>
>> The -Q -O3 --help=optimizers options provides us the list of enabled
>> and disabled optimizations at -O3 level. If I specify -O3 to compile
>> any file then the total number of passes executed are around 182. And
>> If I manually specify all the optimization which are enabled at -O3
>> (without specifying -O3 actually), we get the total number of passes
>> as 64. So, my question is that why is there a difference of passes
>> between these two cases?
>
> This question is asked on this list just about every month; the manual
> documents the optimizer options that are controllable via flags at each
> level, but there are many more optimization behaviors enabled at each level
> which do not have individual controls.
>
> In other words, it is not possible to manually enable all optimizations that
> would be enabled when using -O3; it is only possible to enable all of them
> with -O3 and then disable any that you don't want enabled (which is why the
> manual documents them).
>
> --
> Kevin P. Fleming
> Digium, Inc. | Director of Software Technologies
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
> skype: kpfleming | jabber: kfleming@digium.com
> Check us out at www.digium.com & www.asterisk.org
>


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