This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Problem on handling fall-through edge in bb-reorder
- From: "Amker.Cheng" <amker dot cheng at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 6 Apr 2010 10:28:55 +0800
- Subject: Problem on handling fall-through edge in bb-reorder
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.