Commit 48b881a3 by Kazu Hirata Committed by Jeff Law

* jump.c: Fix formatting.

From-SVN: r35453
parent 2e71ae82
...@@ -10,6 +10,8 @@ Thu Aug 3 15:53:03 2000 J"orn Rennecke <amylaar@cygnus.co.uk> ...@@ -10,6 +10,8 @@ Thu Aug 3 15:53:03 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2000-08-03 Kazu Hirata <kazu@hxi.com> 2000-08-03 Kazu Hirata <kazu@hxi.com>
* jump.c: Fix formatting.
* toplev.c: Fix formatting. * toplev.c: Fix formatting.
Thu Aug 3 01:05:32 2000 Jeffrey A Law (law@cygnus.com) Thu Aug 3 01:05:32 2000 Jeffrey A Law (law@cygnus.com)
......
...@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -19,7 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* This is the jump-optimization pass of the compiler. /* This is the jump-optimization pass of the compiler.
It is run two or three times: once before cse, sometimes once after cse, It is run two or three times: once before cse, sometimes once after cse,
and once after reload (before final). and once after reload (before final).
...@@ -156,6 +155,7 @@ rebuild_jump_labels (f) ...@@ -156,6 +155,7 @@ rebuild_jump_labels (f)
} }
/* Alternate entry into the jump optimizer. Do only trivial optimizations. */ /* Alternate entry into the jump optimizer. Do only trivial optimizations. */
void void
jump_optimize_minimal (f) jump_optimize_minimal (f)
rtx f; rtx f;
...@@ -894,7 +894,7 @@ delete_unreferenced_labels (f) ...@@ -894,7 +894,7 @@ delete_unreferenced_labels (f)
rtx final = NULL_RTX; rtx final = NULL_RTX;
rtx insn; rtx insn;
for (insn = f; insn; ) for (insn = f; insn;)
{ {
if (GET_CODE (insn) == CODE_LABEL if (GET_CODE (insn) == CODE_LABEL
&& LABEL_NUSES (insn) == 0 && LABEL_NUSES (insn) == 0
...@@ -919,7 +919,7 @@ delete_noop_moves (f) ...@@ -919,7 +919,7 @@ delete_noop_moves (f)
{ {
rtx insn, next; rtx insn, next;
for (insn = f; insn; ) for (insn = f; insn;)
{ {
next = NEXT_INSN (insn); next = NEXT_INSN (insn);
...@@ -1291,7 +1291,8 @@ duplicate_loop_exit_test (loop_start) ...@@ -1291,7 +1291,8 @@ duplicate_loop_exit_test (loop_start)
break; break;
case JUMP_INSN: case JUMP_INSN:
copy = emit_jump_insn_before (copy_insn (PATTERN (insn)), loop_start); copy = emit_jump_insn_before (copy_insn (PATTERN (insn)),
loop_start);
if (reg_map) if (reg_map)
replace_regs (PATTERN (copy), reg_map, max_reg, 1); replace_regs (PATTERN (copy), reg_map, max_reg, 1);
mark_jump_label (PATTERN (copy), copy, 0, 0); mark_jump_label (PATTERN (copy), copy, 0, 0);
...@@ -2131,7 +2132,8 @@ condjump_p (insn) ...@@ -2131,7 +2132,8 @@ condjump_p (insn)
x = SET_SRC (x); x = SET_SRC (x);
if (GET_CODE (x) == LABEL_REF) if (GET_CODE (x) == LABEL_REF)
return 1; return 1;
else return (GET_CODE (x) == IF_THEN_ELSE else
return (GET_CODE (x) == IF_THEN_ELSE
&& ((GET_CODE (XEXP (x, 2)) == PC && ((GET_CODE (XEXP (x, 2)) == PC
&& (GET_CODE (XEXP (x, 1)) == LABEL_REF && (GET_CODE (XEXP (x, 1)) == LABEL_REF
|| GET_CODE (XEXP (x, 1)) == RETURN)) || GET_CODE (XEXP (x, 1)) == RETURN))
...@@ -2513,7 +2515,8 @@ mark_jump_label (x, insn, cross_jump, in_mem) ...@@ -2513,7 +2515,8 @@ mark_jump_label (x, insn, cross_jump, in_mem)
|| NOTE_LINE_NUMBER (next) == NOTE_INSN_FUNCTION_END || NOTE_LINE_NUMBER (next) == NOTE_INSN_FUNCTION_END
/* ??? Optional. Disables some optimizations, but /* ??? Optional. Disables some optimizations, but
makes gcov output more accurate with -O. */ makes gcov output more accurate with -O. */
|| (flag_test_coverage && NOTE_LINE_NUMBER (next) > 0))) || (flag_test_coverage
&& NOTE_LINE_NUMBER (next) > 0)))
break; break;
} }
...@@ -2680,12 +2683,15 @@ delete_prior_computation (note, insn) ...@@ -2680,12 +2683,15 @@ delete_prior_computation (note, insn)
{ {
int dest_regno = REGNO (SET_DEST (pat)); int dest_regno = REGNO (SET_DEST (pat));
int dest_endregno int dest_endregno
= dest_regno + (dest_regno < FIRST_PSEUDO_REGISTER = (dest_regno
+ (dest_regno < FIRST_PSEUDO_REGISTER
? HARD_REGNO_NREGS (dest_regno, ? HARD_REGNO_NREGS (dest_regno,
GET_MODE (SET_DEST (pat))) : 1); GET_MODE (SET_DEST (pat))) : 1));
int regno = REGNO (reg); int regno = REGNO (reg);
int endregno = regno + (regno < FIRST_PSEUDO_REGISTER int endregno
? HARD_REGNO_NREGS (regno, GET_MODE (reg)) : 1); = (regno
+ (regno < FIRST_PSEUDO_REGISTER
? HARD_REGNO_NREGS (regno, GET_MODE (reg)) : 1));
if (dest_regno >= regno if (dest_regno >= regno
&& dest_endregno <= endregno) && dest_endregno <= endregno)
...@@ -2701,7 +2707,8 @@ delete_prior_computation (note, insn) ...@@ -2701,7 +2707,8 @@ delete_prior_computation (note, insn)
int i; int i;
REG_NOTES (our_prev) REG_NOTES (our_prev)
= gen_rtx_EXPR_LIST (REG_UNUSED, reg, REG_NOTES (our_prev)); = gen_rtx_EXPR_LIST (REG_UNUSED, reg,
REG_NOTES (our_prev));
for (i = dest_regno; i < dest_endregno; i++) for (i = dest_regno; i < dest_endregno; i++)
if (! find_regno_note (our_prev, REG_UNUSED, i)) if (! find_regno_note (our_prev, REG_UNUSED, i))
...@@ -2800,7 +2807,8 @@ delete_computation (insn) ...@@ -2800,7 +2807,8 @@ delete_computation (insn)
|| find_regno_note (insn, REG_DEAD, i)) || find_regno_note (insn, REG_DEAD, i))
continue; continue;
note = gen_rtx_EXPR_LIST (REG_DEAD, (i < FIRST_PSEUDO_REGISTER note = gen_rtx_EXPR_LIST (REG_DEAD,
(i < FIRST_PSEUDO_REGISTER
? gen_rtx_REG (reg_raw_mode[i], i) ? gen_rtx_REG (reg_raw_mode[i], i)
: SET_DEST (set)), NULL_RTX); : SET_DEST (set)), NULL_RTX);
delete_prior_computation (note, insn); delete_prior_computation (note, insn);
...@@ -3265,7 +3273,7 @@ invert_exp_1 (insn) ...@@ -3265,7 +3273,7 @@ invert_exp_1 (insn)
rtx x = pc_set (insn); rtx x = pc_set (insn);
if (!x) if (!x)
abort(); abort ();
x = SET_SRC (x); x = SET_SRC (x);
code = GET_CODE (x); code = GET_CODE (x);
...@@ -3386,7 +3394,8 @@ delete_from_jump_chain (jump) ...@@ -3386,7 +3394,8 @@ delete_from_jump_chain (jump)
/* Handle return insns. */ /* Handle return insns. */
else if (jump_chain && GET_CODE (PATTERN (jump)) == RETURN) else if (jump_chain && GET_CODE (PATTERN (jump)) == RETURN)
index = 0; index = 0;
else return; else
return;
if (jump_chain[index] == jump) if (jump_chain[index] == jump)
jump_chain[index] = jump_chain[INSN_UID (jump)]; jump_chain[index] = jump_chain[INSN_UID (jump)];
...@@ -3802,6 +3811,7 @@ thread_jumps (f, max_reg, flag_before_loop) ...@@ -3802,6 +3811,7 @@ thread_jumps (f, max_reg, flag_before_loop)
{ {
rtx set; rtx set;
rtx set2; rtx set2;
/* Get to a candidate branch insn. */ /* Get to a candidate branch insn. */
if (GET_CODE (b1) != JUMP_INSN if (GET_CODE (b1) != JUMP_INSN
|| ! any_condjump_p (b1) || JUMP_LABEL (b1) == 0) || ! any_condjump_p (b1) || JUMP_LABEL (b1) == 0)
...@@ -3891,7 +3901,8 @@ thread_jumps (f, max_reg, flag_before_loop) ...@@ -3891,7 +3901,8 @@ thread_jumps (f, max_reg, flag_before_loop)
&& rtx_equal_for_thread_p (b1op1, b2op1, b2) && rtx_equal_for_thread_p (b1op1, b2op1, b2)
&& (comparison_dominates_p (code1, code2) && (comparison_dominates_p (code1, code2)
|| (can_reverse_comparison_p (XEXP (SET_SRC (set), 0), b1) || (can_reverse_comparison_p (XEXP (SET_SRC (set), 0), b1)
&& comparison_dominates_p (code1, reverse_condition (code2))))) && comparison_dominates_p (code1,
reverse_condition (code2)))))
{ {
t1 = prev_nonnote_insn (b1); t1 = prev_nonnote_insn (b1);
...@@ -4066,8 +4077,10 @@ rtx_equal_for_thread_p (x, y, yinsn) ...@@ -4066,8 +4077,10 @@ rtx_equal_for_thread_p (x, y, yinsn)
return 0; return 0;
} }
else else
{
if (rtx_equal_for_thread_p (SET_DEST (x), SET_DEST (y), yinsn) == 0) if (rtx_equal_for_thread_p (SET_DEST (x), SET_DEST (y), yinsn) == 0)
return 0; return 0;
}
return rtx_equal_for_thread_p (SET_SRC (x), SET_SRC (y), yinsn); return rtx_equal_for_thread_p (SET_SRC (x), SET_SRC (y), yinsn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment