- REG_NOTES (BB_END (e->src)) = gen_rtx_EXPR_LIST (REG_CROSSING_JUMP,
- NULL_RTX,
- REG_NOTES (BB_END
- (e->src)));
-}
-
-/* Hot and cold basic blocks are partitioned and put in separate
- sections of the .o file, to reduce paging and improve cache
- performance (hopefully). This can result in bits of code from the
- same function being widely separated in the .o file. However this
- is not obvious to the current bb structure. Therefore we must take
- care to ensure that: 1). There are no fall_thru edges that cross
- between sections; 2). For those architectures which have "short"
- conditional branches, all conditional branches that attempt to
- cross between sections are converted to unconditional branches;
- and, 3). For those architectures which have "short" unconditional
- branches, all unconditional branches that attempt to cross between
- sections are converted to indirect jumps.
-
- The code for fixing up fall_thru edges that cross between hot and
- cold basic blocks does so by creating new basic blocks containing
- unconditional branches to the appropriate label in the "other"
- section. The new basic block is then put in the same (hot or cold)
- section as the original conditional branch, and the fall_thru edge
- is modified to fall into the new basic block instead. By adding
- this level of indirection we end up with only unconditional branches
- crossing between hot and cold sections.
-
- Conditional branches are dealt with by adding a level of indirection.
- A new basic block is added in the same (hot/cold) section as the
- conditional branch, and the conditional branch is retargeted to the
- new basic block. The new basic block contains an unconditional branch
- to the original target of the conditional branch (in the other section).
-
- Unconditional branches are dealt with by converting them into
- indirect jumps. */
-
-static void
-fix_edges_for_rarely_executed_code (edge *crossing_edges,
- int n_crossing_edges)
-{
- /* Make sure the source of any crossing edge ends in a jump and the
- destination of any crossing edge has a label. */
-
- add_labels_and_missing_jumps (crossing_edges, n_crossing_edges);
-
- /* Convert all crossing fall_thru edges to non-crossing fall
- thrus to unconditional jumps (that jump to the original fall
- thru dest). */
-
- fix_up_fall_thru_edges ();
-
- /* If the architecture does not have conditional branches that can
- span all of memory, convert crossing conditional branches into
- crossing unconditional branches. */
-
- if (!HAS_LONG_COND_BRANCH)
- fix_crossing_conditional_branches ();
-
- /* If the architecture does not have unconditional branches that
- can span all of memory, convert crossing unconditional branches
- into indirect jumps. Since adding an indirect jump also adds
- a new register usage, update the register usage information as
- well. */
-
- if (!HAS_LONG_UNCOND_BRANCH)
- {
- fix_crossing_unconditional_branches ();
- reg_scan (get_insns(), max_reg_num ());
- }
-
- add_reg_crossing_jump_notes ();