public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Optimisation Problem
@ 2011-04-06 12:19 vikramsp
2011-04-06 19:42 ` Eric Botcazou
0 siblings, 1 reply; 5+ messages in thread
From: vikramsp @ 2011-04-06 12:19 UTC (permalink / raw)
To: gcc-bugs
hello there... i am trying my hands on gcc optimisations options.
i tried e.g. -finline-functions, -funroll-loops and the likes but none
worked for me
for ex. i tried -funroll-loops for code
for (int i = 0; i < 3; ++i)
a[i] = i;
which should unroll like
a[0] = 0
a[1] = 1
a[2] = 2
but it didn't seem to happen. Is this a bug or something?
please help me write good test case or suggest some. i am using gcc
4.1.2. tried 5.4.2 also on rhel5
Best Regards
--
View this message in context: http://old.nabble.com/Optimisation-Problem-tp31332686p31332686.html
Sent from the gcc - bugs mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimisation Problem
2011-04-06 12:19 Optimisation Problem vikramsp
@ 2011-04-06 19:42 ` Eric Botcazou
2011-04-07 3:43 ` vikramsp
0 siblings, 1 reply; 5+ messages in thread
From: Eric Botcazou @ 2011-04-06 19:42 UTC (permalink / raw)
To: vikramsp; +Cc: gcc-bugs
> hello there... i am trying my hands on gcc optimisations options.
> i tried e.g. -finline-functions, -funroll-loops and the likes but none
> worked for me
> for ex. i tried -funroll-loops for code
> for (int i = 0; i < 3; ++i)
> a[i] = i;
Try -O -funroll-loops.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimisation Problem
2011-04-06 19:42 ` Eric Botcazou
@ 2011-04-07 3:43 ` vikramsp
2011-04-07 6:49 ` Eric Botcazou
0 siblings, 1 reply; 5+ messages in thread
From: vikramsp @ 2011-04-07 3:43 UTC (permalink / raw)
To: gcc-bugs
Thanks Eric.
But i wanted to try them indivisually. Is there any method to do so?
Regards - vikramsp
Eric Botcazou-3 wrote:
>
>> hello there... i am trying my hands on gcc optimisations options.
>> i tried e.g. -finline-functions, -funroll-loops and the likes but none
>> worked for me
>> for ex. i tried -funroll-loops for code
>> for (int i = 0; i < 3; ++i)
>> a[i] = i;
>
> Try -O -funroll-loops.
>
> --
> Eric Botcazou
>
>
--
View this message in context: http://old.nabble.com/Optimisation-Problem-tp31332686p31339223.html
Sent from the gcc - bugs mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimisation Problem
2011-04-07 3:43 ` vikramsp
@ 2011-04-07 6:49 ` Eric Botcazou
2011-04-18 6:12 ` vikramsp
0 siblings, 1 reply; 5+ messages in thread
From: Eric Botcazou @ 2011-04-07 6:49 UTC (permalink / raw)
To: vikramsp; +Cc: gcc-bugs
> But i wanted to try them indivisually. Is there any method to do so?
The compiler doesn't optimize anything if you don't pass at least -O.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Optimisation Problem
2011-04-07 6:49 ` Eric Botcazou
@ 2011-04-18 6:12 ` vikramsp
0 siblings, 0 replies; 5+ messages in thread
From: vikramsp @ 2011-04-18 6:12 UTC (permalink / raw)
To: gcc-bugs
Thanks Eric
Eric Botcazou-3 wrote:
>
>> But i wanted to try them indivisually. Is there any method to do so?
>
> The compiler doesn't optimize anything if you don't pass at least -O.
>
> --
> Eric Botcazou
>
>
--
View this message in context: http://old.nabble.com/Optimisation-Problem-tp31332686p31420992.html
Sent from the gcc - bugs mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-18 6:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06 12:19 Optimisation Problem vikramsp
2011-04-06 19:42 ` Eric Botcazou
2011-04-07 3:43 ` vikramsp
2011-04-07 6:49 ` Eric Botcazou
2011-04-18 6:12 ` vikramsp
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).