* Problem on handling fall-through edge in bb-reorder
@ 2010-04-06 2:29 Amker.Cheng
0 siblings, 0 replies; only message in thread
From: Amker.Cheng @ 2010-04-06 2:29 UTC (permalink / raw)
To: gcc
Hi All:
I read codes in bb-reorder pass. normally it's fine to take the most
probable basic block as the downward bb.
unfortunately, the processor I'm working on is a little different.
It has no pipeline stall when branches are taken, but does introduce
stall when they are not taken.
take an example code like:
--------------
statement 0;
if likely(condition)
statement 1;
else
statement 2;
return;
gcc may generate :
---------------
statement 0;
if !(condition) branch to label x;
statement 1;
return;
label x:
statement 2;
return;
Which is less effective on my processor. I am wondering whether possible
to modify codes in bb-reorder making gcc to take the less probable basic
block as the downward bb?
So any tips? Thanks in advance.
--
Best Regards.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-06 2:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-06 2:29 Problem on handling fall-through edge in bb-reorder Amker.Cheng
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).