summaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-01 05:50:51 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-01 05:50:51 +0000
commite49e8bd540832217538f9720f502da8c20f1f9b0 (patch)
tree8f6bc6f898cfafd809ea3bf6f2a7660a896f9a40 /gcc/loop-invariant.c
parentb528597c9f3f2e3a64a664c7be6c82a7c2688287 (diff)
downloadgcc-e49e8bd540832217538f9720f502da8c20f1f9b0.tar.gz
2008-07-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r137307 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137309 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index dd75b3a3a8f..40e70ba18c0 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -164,8 +164,7 @@ check_invariant_table_size (void)
if (invariant_table_size < DF_DEFS_TABLE_SIZE())
{
unsigned int new_size = DF_DEFS_TABLE_SIZE () + (DF_DEFS_TABLE_SIZE () / 4);
- invariant_table = xrealloc (invariant_table,
- sizeof (struct rtx_iv *) * new_size);
+ invariant_table = XRESIZEVEC (struct invariant *, invariant_table, new_size);
memset (&invariant_table[invariant_table_size], 0,
(new_size - invariant_table_size) * sizeof (struct rtx_iv *));
invariant_table_size = new_size;
@@ -417,7 +416,8 @@ invariant_expr_equal_p (rtx insn1, rtx e1, rtx insn2, rtx e2)
static hashval_t
hash_invariant_expr (const void *e)
{
- const struct invariant_expr_entry *entry = e;
+ const struct invariant_expr_entry *const entry =
+ (const struct invariant_expr_entry *) e;
return entry->hash;
}
@@ -427,8 +427,10 @@ hash_invariant_expr (const void *e)
static int
eq_invariant_expr (const void *e1, const void *e2)
{
- const struct invariant_expr_entry *entry1 = e1;
- const struct invariant_expr_entry *entry2 = e2;
+ const struct invariant_expr_entry *const entry1 =
+ (const struct invariant_expr_entry *) e1;
+ const struct invariant_expr_entry *const entry2 =
+ (const struct invariant_expr_entry *) e2;
if (entry1->mode != entry2->mode)
return 0;
@@ -454,7 +456,7 @@ find_or_insert_inv (htab_t eq, rtx expr, enum machine_mode mode,
pentry.inv = inv;
pentry.mode = mode;
slot = htab_find_slot_with_hash (eq, &pentry, hash, INSERT);
- entry = *slot;
+ entry = (struct invariant_expr_entry *) *slot;
if (entry)
return entry->inv;