static int max_uid;
/* Get the cuid of an insn. */
+#ifdef ENABLE_CHECKING
+#define INSN_CUID(INSN) (INSN_UID (INSN) > max_uid ? (abort (), 0) : uid_cuid[INSN_UID (INSN)])
+#else
#define INSN_CUID(INSN) (uid_cuid[INSN_UID (INSN)])
+#endif
/* Number of cuids. */
static int max_cuid;
for (insn = f, i = 0; insn; insn = NEXT_INSN (insn))
{
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
- INSN_CUID (insn) = i++;
+ uid_cuid[INSN_UID (insn)] = i++;
else
- INSN_CUID (insn) = i;
+ uid_cuid[INSN_UID (insn)] = i;
}
/* Create a table mapping cuids to insns. */
sizeof (struct reg_set));
bytes_used += sizeof (struct reg_set);
new_reg_info->insn = insn;
- new_reg_info->next = NULL;
- if (reg_set_table[regno] == NULL)
- reg_set_table[regno] = new_reg_info;
- else
- {
- reg_info_ptr1 = reg_info_ptr2 = reg_set_table[regno];
- /* ??? One could keep a "last" pointer to speed this up. */
- while (reg_info_ptr1 != NULL)
- {
- reg_info_ptr2 = reg_info_ptr1;
- reg_info_ptr1 = reg_info_ptr1->next;
- }
-
- reg_info_ptr2->next = new_reg_info;
- }
+ new_reg_info->next = reg_set_table[regno];
+ reg_set_table[regno] = new_reg_info;
}
/* Called from compute_sets via note_stores to handle one SET or CLOBBER in
static void
compute_pre_data ()
{
+ int i;
+
compute_local_properties (transp, comp, antloc, 0);
compute_transpout ();
sbitmap_vector_zero (ae_kill, n_basic_blocks);
- compute_ae_kill (comp, ae_kill);
+
+ /* Compute ae_kill for each basic block using:
+
+ ~(TRANSP | COMP)
+
+ This is significantly faster than compute_ae_kill. */
+
+ for (i = 0; i < n_basic_blocks; i++)
+ {
+ sbitmap_a_or_b (ae_kill[i], transp[i], comp[i]);
+ sbitmap_not (ae_kill[i], ae_kill[i]);
+ }
+
edge_list = pre_edge_lcm (gcse_file, n_exprs, transp, comp, antloc,
ae_kill, &pre_insert_map, &pre_delete_map);
}
If we inserted before the CODE_LABEL, then we would be putting
the insn in the wrong basic block. In that case, put the insn
after the CODE_LABEL. Also, respect NOTE_INSN_BASIC_BLOCK. */
- if (GET_CODE (insn) == CODE_LABEL)
- insn = NEXT_INSN (insn);
- else if (GET_CODE (insn) == NOTE
- && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK)
+ while (GET_CODE (insn) == CODE_LABEL
+ || (GET_CODE (insn) == NOTE
+ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK))
insn = NEXT_INSN (insn);
new_insn = emit_block_insn_before (pat, insn, BASIC_BLOCK (bb));
/* Go through the basic blocks, seeing whether or not each block
ends with a conditional branch whose condition is a comparison
against zero. Record the register compared in BLOCK_REG. */
- block_reg = (int *) xcalloc (n_basic_blocks, sizeof (int));
+ block_reg = (unsigned int *) xcalloc (n_basic_blocks, sizeof (int));
for (bb = 0; bb < n_basic_blocks; bb++)
{
rtx last_insn = BLOCK_END (bb);
/* We only want conditional branches. */
if (GET_CODE (last_insn) != JUMP_INSN
- || !condjump_p (last_insn)
- || simplejump_p (last_insn))
+ || !any_condjump_p (last_insn)
+ || !onlyjump_p (last_insn))
continue;
/* LAST_INSN is a conditional jump. Get its condition. */