Caroline Tice <ctice@apple.com> writes:
+ ??? If two basic blocks could otherwise be merged (which
implies
+ that the jump between the two is unconditional), and one is in
a
+ hot section and the other is in a cold section, surely that
means
+ that one of the section choices is wrong. */
Why would that mean one is in the wrong section? For those
architectures for which unconditional branches can reach all of
memory this is exactly the situation that I would expect: jumps
between sections (in that case) would use unconditional branches.
It isn't that the jump is unconditional, but that the jump is the only
edge leaving A and the only edge entering B. (Being unconditional is
a consequence of that.) If basic blocks A and B are candidates for
merging, they will be executed exactly the same number of times in all
possible runs of the program, and therefore it is nonsensical for them
to be in different partitions.