-#include "target.h"
-
-#ifdef INSN_SCHEDULING
-/* target_units bitmask has 1 for each unit in the cpu. It should be
- possible to compute this variable from the machine description.
- But currently it is computed by examining the insn list. Since
- this is only needed for visualization, it seems an acceptable
- solution. (For understanding the mapping of bits to units, see
- definition of function_units[] in "insn-attrtab.c".) The scheduler
- using only DFA description should never use the following variable. */
-
-static int target_units = 0;
-
-static char *safe_concat PARAMS ((char *, char *, const char *));
-static int get_visual_tbl_length PARAMS ((void));
-static void print_exp PARAMS ((char *, rtx, int));
-static void print_value PARAMS ((char *, rtx, int));
-static void print_pattern PARAMS ((char *, rtx, int));
-
-/* Print names of units on which insn can/should execute, for debugging. */
-
-void
-insn_print_units (insn)
- rtx insn;
-{
- int i;
- int unit = insn_unit (insn);
-
- if (unit == -1)
- fprintf (sched_dump, "none");
- else if (unit >= 0)
- fprintf (sched_dump, "%s", function_units[unit].name);
- else
- {
- fprintf (sched_dump, "[");
- for (i = 0, unit = ~unit; unit; i++, unit >>= 1)
- if (unit & 1)
- {
- fprintf (sched_dump, "%s", function_units[i].name);
- if (unit != 1)
- fprintf (sched_dump, " ");
- }
- fprintf (sched_dump, "]");
- }
-}
-
-/* MAX_VISUAL_LINES is the maximum number of lines in visualization table
- of a basic block. If more lines are needed, table is splitted to two.
- n_visual_lines is the number of lines printed so far for a block.
- visual_tbl contains the block visualization info.
- vis_no_unit holds insns in a cycle that are not mapped to any unit. */
-#define MAX_VISUAL_LINES 100
-#define INSN_LEN 30
-int n_visual_lines;
-static unsigned visual_tbl_line_length;
-char *visual_tbl;
-int n_vis_no_unit;
-#define MAX_VISUAL_NO_UNIT 20
-rtx vis_no_unit[MAX_VISUAL_NO_UNIT];
-
-/* Finds units that are in use in this function. Required only
- for visualization. */
-
-void
-init_target_units ()
-{
- rtx insn;
- int unit;
-
- for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
- {
- if (! INSN_P (insn))
- continue;
-
- unit = insn_unit (insn);
-
- if (unit < 0)
- target_units |= ~unit;
- else
- target_units |= (1 << unit);
- }
-}