Zdenek Dvorak wrote:
I am probably missing something:
The basic idea is enabling cfglayout mode and then ensuring that insn
stream and control flow are in sync with each other at all times. This
is required because e.g. on Itanium the final bundling happens right
after scheduling, and any extra jumps emitted by cfg_layout_finalize
will spoil the schedule.
what is the difference between this idea and the cfgrtl mode?
In cfgrtl mode, the functions to manipulate the cfg ensure that the
insn stream and the CFG match. For cfglayout mode you have to do it by
hand.
I must say that I do not like this idea at all. As cfgrtl mode routines
show, this is nontrivial (and consequently, error-prone), and you would
be duplicating much of cfgrtl functionality. I fail to see the
advantage over simply using cfgrtl mode and handling the created jump
insns (by checking the last insn of altered and newly created blocks, no
changes to cfgrtl routines or new hooks necessary),
I would prefer to do that too, as it seems a cleaner approach. I am
still willing to try the cfglayout idea, but if there is a disagreement
about its usefulness, maybe it's better to proceed with your suggestion
(I have suggested something similar to Ian at
http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01738.html). What do the
other maintainers think?
Andrey