ifcvt.c (seq_contains_jump): Delete function.
* ifcvt.c (seq_contains_jump): Delete function. (end_ifcvt_sequence): Replace call to seq_contains_jump with an inline test for a jump instruction in the existing "insn" loop. (block_fallthru): Document function. From-SVN: r83697
This commit is contained in:
parent
0e60562abe
commit
c520979797
2 changed files with 15 additions and 24 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-06-25 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
|
* ifcvt.c (seq_contains_jump): Delete function.
|
||||||
|
(end_ifcvt_sequence): Replace call to seq_contains_jump with an
|
||||||
|
inline test for a jump instruction in the existing "insn" loop.
|
||||||
|
(block_fallthru): Document function.
|
||||||
|
|
||||||
2004-06-25 Philip Blundell <philb@gnu.org>
|
2004-06-25 Philip Blundell <philb@gnu.org>
|
||||||
|
|
||||||
PR wrong-code/15089
|
PR wrong-code/15089
|
||||||
|
|
32
gcc/ifcvt.c
32
gcc/ifcvt.c
|
@ -88,7 +88,6 @@ static bool life_data_ok;
|
||||||
static int count_bb_insns (basic_block);
|
static int count_bb_insns (basic_block);
|
||||||
static rtx first_active_insn (basic_block);
|
static rtx first_active_insn (basic_block);
|
||||||
static rtx last_active_insn (basic_block, int);
|
static rtx last_active_insn (basic_block, int);
|
||||||
static int seq_contains_jump (rtx);
|
|
||||||
static basic_block block_fallthru (basic_block);
|
static basic_block block_fallthru (basic_block);
|
||||||
static int cond_exec_process_insns (ce_if_block_t *, rtx, rtx, rtx, rtx, int);
|
static int cond_exec_process_insns (ce_if_block_t *, rtx, rtx, rtx, rtx, int);
|
||||||
static rtx cond_exec_get_condition (rtx);
|
static rtx cond_exec_get_condition (rtx);
|
||||||
|
@ -213,22 +212,7 @@ last_active_insn (basic_block bb, int skip_use_p)
|
||||||
return insn;
|
return insn;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It is possible, especially when having dealt with multi-word
|
/* Return the basic block reached by falling though the basic block BB. */
|
||||||
arithmetic, for the expanders to have emitted jumps. Search
|
|
||||||
through the sequence and return TRUE if a jump exists so that
|
|
||||||
we can abort the conversion. */
|
|
||||||
|
|
||||||
static int
|
|
||||||
seq_contains_jump (rtx insn)
|
|
||||||
{
|
|
||||||
while (insn)
|
|
||||||
{
|
|
||||||
if (GET_CODE (insn) == JUMP_INSN)
|
|
||||||
return 1;
|
|
||||||
insn = NEXT_INSN (insn);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static basic_block
|
static basic_block
|
||||||
block_fallthru (basic_block bb)
|
block_fallthru (basic_block bb)
|
||||||
|
@ -707,7 +691,7 @@ noce_emit_move_insn (rtx x, rtx y)
|
||||||
static rtx
|
static rtx
|
||||||
end_ifcvt_sequence (struct noce_if_info *if_info)
|
end_ifcvt_sequence (struct noce_if_info *if_info)
|
||||||
{
|
{
|
||||||
rtx y;
|
rtx insn;
|
||||||
rtx seq = get_insns ();
|
rtx seq = get_insns ();
|
||||||
|
|
||||||
set_used_flags (if_info->x);
|
set_used_flags (if_info->x);
|
||||||
|
@ -715,15 +699,15 @@ end_ifcvt_sequence (struct noce_if_info *if_info)
|
||||||
unshare_all_rtl_in_chain (seq);
|
unshare_all_rtl_in_chain (seq);
|
||||||
end_sequence ();
|
end_sequence ();
|
||||||
|
|
||||||
if (seq_contains_jump (seq))
|
/* Make sure that all of the instructions emitted are recognizable,
|
||||||
return NULL_RTX;
|
and that we haven't introduced a new jump instruction.
|
||||||
|
|
||||||
/* Make sure that all of the instructions emitted are recognizable.
|
|
||||||
As an excersise for the reader, build a general mechanism that
|
As an excersise for the reader, build a general mechanism that
|
||||||
allows proper placement of required clobbers. */
|
allows proper placement of required clobbers. */
|
||||||
for (y = seq; y ; y = NEXT_INSN (y))
|
for (insn = seq; insn; insn = NEXT_INSN (insn))
|
||||||
if (recog_memoized (y) == -1)
|
if (GET_CODE (insn) == JUMP_INSN
|
||||||
|
|| recog_memoized (insn) == -1)
|
||||||
return NULL_RTX;
|
return NULL_RTX;
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue