/* Dead-code elimination pass for the GNU compiler.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Jeffrey D. Oldham <oldham@codesourcery.com>.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
-GNU CC is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to the Free
+along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
rtx dest;
void *data;
{
- int *inherently_necessary_set_p = (int *)data;
+ int *inherently_necessary_set_p = (int *) data;
while (GET_CODE (dest) == SUBREG
|| GET_CODE (dest) == STRICT_LOW_PART
{
case CALL_INSN:
case BARRIER:
+ case PREFETCH:
return !0;
case CODE_LABEL:
case NOTE:
}
default:
/* Found an impossible insn type. */
- abort();
+ abort ();
break;
}
}
delete_insn_bb (insn)
rtx insn;
{
- basic_block bb;
if (!insn)
abort ();
if (! INSN_P (insn))
return;
- bb = BLOCK_FOR_INSN (insn);
- if (!bb)
- abort ();
- if (bb->head == bb->end)
- {
- /* Delete the insn by converting it to a note. */
- PUT_CODE (insn, NOTE);
- NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
- return;
- }
- else if (insn == bb->head)
- bb->head = NEXT_INSN (insn);
- else if (insn == bb->end)
- bb->end = PREV_INSN (insn);
delete_insn (insn);
}
\f
for (i = 0; i < n_basic_blocks; ++i)
if (pdom[i] == INVALID_BLOCK)
pdom[i] = EXIT_BLOCK;
- el = create_edge_list();
+ el = create_edge_list ();
find_all_control_dependences (el, pdom, cdbte);
/* Find inherently necessary instructions. */
/* Create an edge from this block to the post dominator.
What about the PHI nodes at the target? */
- make_edge (NULL, bb, pdom_bb, 0);
+ make_edge (bb, pdom_bb, 0);
/* Third, transform this insn into an unconditional
jump to the label for the immediate postdominator. */