Commit 278a83b2 by Kazu Hirata Committed by Jeff Law

* cse.c: Fix a comment typo. Fix formatting.

From-SVN: r35472
parent 11837777
2000-08-04 Kazu Hirata <kazu@hxi.com>
* cse.c: Fix a comment typo. Fix formatting.
2000-08-03 Richard Henderson <rth@cygnus.com> 2000-08-03 Richard Henderson <rth@cygnus.com>
* config/i386/i386.md (return_indirect_internal): New. * config/i386/i386.md (return_indirect_internal): New.
......
...@@ -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. */
#include "config.h" #include "config.h"
/* stdio.h must precede rtl.h for FFS. */ /* stdio.h must precede rtl.h for FFS. */
#include "system.h" #include "system.h"
...@@ -446,7 +445,6 @@ static int hash_arg_in_memory; ...@@ -446,7 +445,6 @@ static int hash_arg_in_memory;
field is the mode it was being used as. Each constant is field is the mode it was being used as. Each constant is
recorded separately for each mode it is used with. */ recorded separately for each mode it is used with. */
struct table_elt struct table_elt
{ {
rtx exp; rtx exp;
...@@ -820,7 +818,7 @@ rtx_cost (x, outer_code) ...@@ -820,7 +818,7 @@ rtx_cost (x, outer_code)
default: default:
#ifdef DEFAULT_RTX_COSTS #ifdef DEFAULT_RTX_COSTS
DEFAULT_RTX_COSTS(x, code, outer_code); DEFAULT_RTX_COSTS (x, code, outer_code);
#endif #endif
break; break;
} }
...@@ -839,8 +837,9 @@ rtx_cost (x, outer_code) ...@@ -839,8 +837,9 @@ rtx_cost (x, outer_code)
return total; return total;
} }
/* Return cost of address expression X. Expect that X is propertly formed address /* Return cost of address expression X.
reference. */ Expect that X is propertly formed address reference. */
int int
address_cost (x, mode) address_cost (x, mode)
rtx x; rtx x;
...@@ -855,7 +854,7 @@ address_cost (x, mode) ...@@ -855,7 +854,7 @@ address_cost (x, mode)
return -1; return -1;
/* We may be asked for cost of various unusual addresses, such as operands /* We may be asked for cost of various unusual addresses, such as operands
of push instruction. It is not worthwhile to complicate writting of push instruction. It is not worthwhile to complicate writing
of ADDRESS_COST macro by such cases. */ of ADDRESS_COST macro by such cases. */
if (!memory_address_p (mode, x)) if (!memory_address_p (mode, x))
...@@ -874,7 +873,7 @@ get_cse_reg_info (regno) ...@@ -874,7 +873,7 @@ get_cse_reg_info (regno)
struct cse_reg_info **hash_head = &reg_hash[REGHASH_FN (regno)]; struct cse_reg_info **hash_head = &reg_hash[REGHASH_FN (regno)];
struct cse_reg_info *p; struct cse_reg_info *p;
for (p = *hash_head ; p != NULL; p = p->hash_next) for (p = *hash_head; p != NULL; p = p->hash_next)
if (p->regno == regno) if (p->regno == regno)
break; break;
...@@ -1304,7 +1303,8 @@ remove_from_table (elt, hash) ...@@ -1304,7 +1303,8 @@ remove_from_table (elt, hash)
register struct table_elt *prev = elt->prev_same_value; register struct table_elt *prev = elt->prev_same_value;
register struct table_elt *next = elt->next_same_value; register struct table_elt *next = elt->next_same_value;
if (next) next->prev_same_value = prev; if (next)
next->prev_same_value = prev;
if (prev) if (prev)
prev->next_same_value = next; prev->next_same_value = next;
...@@ -1325,7 +1325,8 @@ remove_from_table (elt, hash) ...@@ -1325,7 +1325,8 @@ remove_from_table (elt, hash)
register struct table_elt *prev = elt->prev_same_hash; register struct table_elt *prev = elt->prev_same_hash;
register struct table_elt *next = elt->next_same_hash; register struct table_elt *next = elt->next_same_hash;
if (next) next->prev_same_hash = prev; if (next)
next->prev_same_hash = prev;
if (prev) if (prev)
prev->next_same_hash = next; prev->next_same_hash = next;
...@@ -1719,7 +1720,6 @@ merge_equiv_classes (class1, class2) ...@@ -1719,7 +1720,6 @@ merge_equiv_classes (class1, class2)
} }
} }
/* Flush the entire hash table. */ /* Flush the entire hash table. */
static void static void
...@@ -1854,7 +1854,7 @@ invalidate (x, full_mode) ...@@ -1854,7 +1854,7 @@ invalidate (x, full_mode)
return; return;
case PARALLEL: case PARALLEL:
for (i = XVECLEN (x, 0) - 1; i >= 0 ; --i) for (i = XVECLEN (x, 0) - 1; i >= 0; --i)
invalidate (XVECEXP (x, 0, i), VOIDmode); invalidate (XVECEXP (x, 0, i), VOIDmode);
return; return;
...@@ -2642,7 +2642,7 @@ canon_reg (x, insn) ...@@ -2642,7 +2642,7 @@ canon_reg (x, insn)
|| ! REGNO_QTY_VALID_P (REGNO (x))) || ! REGNO_QTY_VALID_P (REGNO (x)))
return x; return x;
q = REG_QTY (REGNO(x)); q = REG_QTY (REGNO (x));
ent = &qty_table[q]; ent = &qty_table[q];
first = ent->first_reg; first = ent->first_reg;
return (first >= FIRST_PSEUDO_REGISTER ? regno_reg_rtx[first] return (first >= FIRST_PSEUDO_REGISTER ? regno_reg_rtx[first]
...@@ -3001,7 +3001,8 @@ find_comparison_args (code, parg1, parg2, pmode1, pmode2) ...@@ -3001,7 +3001,8 @@ find_comparison_args (code, parg1, parg2, pmode1, pmode2)
that lets us see what is being compared. */ that lets us see what is being compared. */
p = lookup (arg1, safe_hash (arg1, GET_MODE (arg1)) & HASH_MASK, p = lookup (arg1, safe_hash (arg1, GET_MODE (arg1)) & HASH_MASK,
GET_MODE (arg1)); GET_MODE (arg1));
if (p) p = p->first_same_value; if (p)
p = p->first_same_value;
for (; p; p = p->next_same_value) for (; p; p = p->next_same_value)
{ {
...@@ -3643,7 +3644,7 @@ fold_rtx (x, insn) ...@@ -3643,7 +3644,7 @@ fold_rtx (x, insn)
if (fmt[i] == 'E') if (fmt[i] == 'E')
/* Don't try to fold inside of a vector of expressions. /* Don't try to fold inside of a vector of expressions.
Doing nothing is harmless. */ Doing nothing is harmless. */
{;} ;
} }
/* If a commutative operation, place a constant integer as the second /* If a commutative operation, place a constant integer as the second
...@@ -5105,7 +5106,8 @@ cse_insn (insn, libcall_insn) ...@@ -5105,7 +5106,8 @@ cse_insn (insn, libcall_insn)
elimination of the insn. Indicate this by placing it in elimination of the insn. Indicate this by placing it in
`src_related'. */ `src_related'. */
if (elt) elt = elt->first_same_value; if (elt)
elt = elt->first_same_value;
for (p = elt; p; p = p->next_same_value) for (p = elt; p; p = p->next_same_value)
{ {
enum rtx_code code = GET_CODE (p->exp); enum rtx_code code = GET_CODE (p->exp);
...@@ -5145,7 +5147,6 @@ cse_insn (insn, libcall_insn) ...@@ -5145,7 +5147,6 @@ cse_insn (insn, libcall_insn)
then give it a negative cost. */ then give it a negative cost. */
if (GET_CODE (dest) == code && rtx_equal_p (p->exp, dest)) if (GET_CODE (dest) == code && rtx_equal_p (p->exp, dest))
src_related = dest; src_related = dest;
} }
/* Find the cheapest valid equivalent, trying all the available /* Find the cheapest valid equivalent, trying all the available
...@@ -5221,7 +5222,8 @@ cse_insn (insn, libcall_insn) ...@@ -5221,7 +5222,8 @@ cse_insn (insn, libcall_insn)
continue; continue;
} }
if (elt) src_elt_cost = elt->cost; if (elt)
src_elt_cost = elt->cost;
/* Find cheapest and skip it for the next time. For items /* Find cheapest and skip it for the next time. For items
of equal cost, use this order: of equal cost, use this order:
...@@ -5370,8 +5372,8 @@ cse_insn (insn, libcall_insn) ...@@ -5370,8 +5372,8 @@ cse_insn (insn, libcall_insn)
setting SRC to, use that constant. We ignored it when we setting SRC to, use that constant. We ignored it when we
thought we could make this into a no-op. */ thought we could make this into a no-op. */
if (src_const && COST (src_const) < COST (src) if (src_const && COST (src_const) < COST (src)
&& validate_change (insn, &SET_SRC (sets[i].rtl), src_const, && validate_change (insn, &SET_SRC (sets[i].rtl),
0)) src_const, 0))
src = src_const; src = src_const;
} }
} }
...@@ -5903,7 +5905,7 @@ cse_insn (insn, libcall_insn) ...@@ -5903,7 +5905,7 @@ cse_insn (insn, libcall_insn)
if (GET_CODE (dest) == SUBREG if (GET_CODE (dest) == SUBREG
&& (((GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest))) - 1) && (((GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest))) - 1)
/ UNITS_PER_WORD) / UNITS_PER_WORD)
== (GET_MODE_SIZE (GET_MODE (dest)) - 1)/ UNITS_PER_WORD) == (GET_MODE_SIZE (GET_MODE (dest)) - 1) / UNITS_PER_WORD)
&& (GET_MODE_SIZE (GET_MODE (dest)) && (GET_MODE_SIZE (GET_MODE (dest))
>= GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest)))) >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest))))
&& sets[i].src_elt != 0) && sets[i].src_elt != 0)
...@@ -5996,9 +5998,9 @@ cse_insn (insn, libcall_insn) ...@@ -5996,9 +5998,9 @@ cse_insn (insn, libcall_insn)
rtx src = SET_SRC (sets[0].rtl); rtx src = SET_SRC (sets[0].rtl);
rtx note = find_reg_note (prev, REG_EQUIV, NULL_RTX); rtx note = find_reg_note (prev, REG_EQUIV, NULL_RTX);
validate_change (prev, & SET_DEST (PATTERN (prev)), dest, 1); validate_change (prev, &SET_DEST (PATTERN (prev)), dest, 1);
validate_change (insn, & SET_DEST (sets[0].rtl), src, 1); validate_change (insn, &SET_DEST (sets[0].rtl), src, 1);
validate_change (insn, & SET_SRC (sets[0].rtl), dest, 1); validate_change (insn, &SET_SRC (sets[0].rtl), dest, 1);
apply_change_group (); apply_change_group ();
/* If REG1 was equivalent to a constant, REG0 is not. */ /* If REG1 was equivalent to a constant, REG0 is not. */
...@@ -6541,7 +6543,8 @@ cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks) ...@@ -6541,7 +6543,8 @@ cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks)
rtx p = insn, q; rtx p = insn, q;
int nsets = 0; int nsets = 0;
int low_cuid = INSN_CUID (insn), high_cuid = INSN_CUID (insn); int low_cuid = INSN_CUID (insn), high_cuid = INSN_CUID (insn);
rtx next = GET_RTX_CLASS (GET_CODE (insn)) == 'i' ? insn : next_real_insn (insn); rtx next =
GET_RTX_CLASS (GET_CODE (insn)) == 'i' ? insn : next_real_insn (insn);
int path_size = data->path_size; int path_size = data->path_size;
int path_entry = 0; int path_entry = 0;
int i; int i;
...@@ -7270,7 +7273,7 @@ delete_trivially_dead_insns (insns, nreg) ...@@ -7270,7 +7273,7 @@ delete_trivially_dead_insns (insns, nreg)
if (GET_RTX_CLASS (GET_CODE (insn)) != 'i') if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
insn = prev_real_insn (insn); insn = prev_real_insn (insn);
for ( ; insn; insn = prev) for (; insn; insn = prev)
{ {
int live_insn = 0; int live_insn = 0;
rtx note; rtx note;
......
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