Problem on handling fall-through edge in bb-reorder
Amker.Cheng
amker.cheng@gmail.com
Tue Apr 6 02:29:00 GMT 2010
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.
More information about the Gcc
mailing list