summaryrefslogtreecommitdiff
path: root/gcc/ira-costs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ira-costs.c')
-rw-r--r--gcc/ira-costs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c
index d7299e658d7..b348bbe46fd 100644
--- a/gcc/ira-costs.c
+++ b/gcc/ira-costs.c
@@ -1,5 +1,5 @@
/* IRA hard register and memory cost calculation for allocnos or pseudos.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2014 Free Software Foundation, Inc.
Contributed by Vladimir Makarov <vmakarov@redhat.com>.
This file is part of GCC.
@@ -154,8 +154,9 @@ cost_classes_hasher::hash (const value_type *hv)
inline bool
cost_classes_hasher::equal (const value_type *hv1, const compare_type *hv2)
{
- return hv1->num == hv2->num && memcmp (hv1->classes, hv2->classes,
- sizeof (enum reg_class) * hv1->num);
+ return (hv1->num == hv2->num
+ && memcmp (hv1->classes, hv2->classes,
+ sizeof (enum reg_class) * hv1->num) == 0);
}
/* Delete cost classes info V from the hash table. */
@@ -1585,7 +1586,7 @@ find_costs_and_classes (FILE *dump_file)
{
basic_block bb;
- FOR_EACH_BB (bb)
+ FOR_EACH_BB_FN (bb, cfun)
process_bb_for_costs (bb);
}