- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
You should have received a copy of the GNU General Public License
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. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
{
/* A hack -- there seems to be no easy generic way how to make a
conditional jump from a ccmode comparison. */
{
/* A hack -- there seems to be no easy generic way how to make a
conditional jump from a ccmode comparison. */
- if (GET_CODE (cond) != comp
- || !rtx_equal_p (op0, XEXP (cond, 0))
- || !rtx_equal_p (op1, XEXP (cond, 1)))
- abort ();
+ gcc_assert (GET_CODE (cond) == comp);
+ gcc_assert (rtx_equal_p (op0, XEXP (cond, 0)));
+ gcc_assert (rtx_equal_p (op1, XEXP (cond, 1)));
op0 = force_operand (op0, NULL_RTX);
op1 = force_operand (op1, NULL_RTX);
op0 = force_operand (op0, NULL_RTX);
op1 = force_operand (op1, NULL_RTX);
if (!rtx_equal_p (op[0], XEXP (test, 0))
|| !rtx_equal_p (op[1], XEXP (test, 1)))
return NULL_RTX;
if (!rtx_equal_p (op[0], XEXP (test, 0))
|| !rtx_equal_p (op[1], XEXP (test, 1)))
return NULL_RTX;
- rtx cond, rcond = NULL_RTX, conds, rconds, acond, cinsn = NULL_RTX;
+ rtx cond, rcond = NULL_RTX, conds, rconds, acond, cinsn;
/* Unswitch the loop on this condition. */
nloop = unswitch_loop (loops, loop, bbs[i], cond, cinsn);
/* Unswitch the loop on this condition. */
nloop = unswitch_loop (loops, loop, bbs[i], cond, cinsn);
/* Invoke itself on modified loops. */
unswitch_single_loop (loops, nloop, rconds, num + 1);
/* Invoke itself on modified loops. */
unswitch_single_loop (loops, nloop, rconds, num + 1);
rtx cond, rtx cinsn)
{
edge entry, latch_edge, true_edge, false_edge, e;
rtx cond, rtx cinsn)
{
edge entry, latch_edge, true_edge, false_edge, e;
- if (!flow_bb_inside_loop_p (loop, unswitch_on))
- abort ();
- if (EDGE_COUNT (unswitch_on->succs) != 2)
- abort ();
- if (!just_once_each_iteration_p (loop, unswitch_on))
- abort ();
- if (loop->inner)
- abort ();
- if (!flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 0)->dest))
- abort ();
- if (!flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 1)->dest))
- abort ();
+ gcc_assert (flow_bb_inside_loop_p (loop, unswitch_on));
+ gcc_assert (EDGE_COUNT (unswitch_on->succs) == 2);
+ gcc_assert (just_once_each_iteration_p (loop, unswitch_on));
+ gcc_assert (!loop->inner);
+ gcc_assert (flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 0)->dest));
+ gcc_assert (flow_bb_inside_loop_p (loop, EDGE_SUCC (unswitch_on, 1)->dest));
irred_flag = entry->flags & EDGE_IRREDUCIBLE_LOOP;
entry->flags &= ~EDGE_IRREDUCIBLE_LOOP;
zero_bitmap = sbitmap_alloc (2);
sbitmap_zero (zero_bitmap);
if (!duplicate_loop_to_header_edge (loop, entry, loops, 1,
zero_bitmap, NULL, NULL, NULL, 0))
irred_flag = entry->flags & EDGE_IRREDUCIBLE_LOOP;
entry->flags &= ~EDGE_IRREDUCIBLE_LOOP;
zero_bitmap = sbitmap_alloc (2);
sbitmap_zero (zero_bitmap);
if (!duplicate_loop_to_header_edge (loop, entry, loops, 1,
zero_bitmap, NULL, NULL, NULL, 0))
/* Loopify from the copy of LOOP body, constructing the new loop. */
nloop = loopify (loops, latch_edge,
/* Loopify from the copy of LOOP body, constructing the new loop. */
nloop = loopify (loops, latch_edge,
- EDGE_PRED (loop->header->rbi->copy, 0), switch_bb,
+ single_pred_edge (get_bb_copy (loop->header)), switch_bb,
BRANCH_EDGE (switch_bb), FALLTHRU_EDGE (switch_bb), true);
/* Remove branches that are now unreachable in new loops. */
BRANCH_EDGE (switch_bb), FALLTHRU_EDGE (switch_bb), true);
/* Remove branches that are now unreachable in new loops. */