summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestat.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-27 20:37:53 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-27 21:15:42 +0200
commit8d14210e48e14de3b1d7bca00df590ca92700e0b (patch)
treec6657537705165b724bd831735fb80723f8edb49 /ir/be/bestat.c
parent4652701dd62546a5a9fbcafddb990784e3493631 (diff)
be: Give the none register requirement a register class.
Now register requirements always have have a register class. This is more consistent and removes some null pointer checks.
Diffstat (limited to 'ir/be/bestat.c')
-rw-r--r--ir/be/bestat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/bestat.c b/ir/be/bestat.c
index e114fa2..8325620 100644
--- a/ir/be/bestat.c
+++ b/ir/be/bestat.c
@@ -222,7 +222,7 @@ static void block_count_values(ir_node *block, void *data)
be_foreach_value(node, value,
arch_register_req_t const *const req
= arch_get_irn_register_req(value);
- if (req->cls == NULL)
+ if (!req->cls->regs)
continue;
++stats->values;
if (req->should_be_same != 0 || is_Phi(value))
@@ -232,7 +232,7 @@ static void block_count_values(ir_node *block, void *data)
);
for (int i = 0, arity = get_irn_arity(node); i < arity; ++i) {
const arch_register_req_t *req = arch_get_irn_register_req_in(node, i);
- if (req->cls == NULL)
+ if (!req->cls->regs)
continue;
++stats->uses;
if (be_is_Keep(node)) {