This is the mail archive of the gcc@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: Fixing jumps reachability after block reordering


+++ Ian Lance Taylor [06/07/07 09:16 -0700]:
> shorten_branches should work correctly--you shouldn't need to do
> anything special.  My only guess is that there is something wrong with
> the way you are reordering the blocks.  For example, perhaps you are
> simply reordering the CFG without reordering the insn chain.  Note
> that shorten_branches is not (yet) CFG aware.  It simply walks the
> insn chain.

To reorder BBs I use the following procedure:

1. cfg_layout_initialize (0);
2. FOR_EACH_BB(bb) set bb->rbi->next properly for each, so they all create
  a chain of BB
3. cfg_layout_finalize();

Does this reorder the insn chain?  If not, how do I reorder it? 
Or where do I look for how it's done?

G.

-- 
Gregory B. Prokopski       <gadek@debian.org>
Sable Research Group       http://www.sable.mcgill.ca
Montreal, Quebec, Canada


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