From 06deb2a54cf1b12c2ac41ab26d77aae66e49afc6 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sat, 24 Nov 2012 15:55:12 +0100 Subject: [PATCH] beinsn: Remove a pointless if. The register class cannot be null here, because only operands for the current class are collected before. --- ir/be/beinsn.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/ir/be/beinsn.c b/ir/be/beinsn.c index 849619edb..e72fd8927 100644 --- a/ir/be/beinsn.c +++ b/ir/be/beinsn.c @@ -114,20 +114,11 @@ be_insn_t *be_scan_insn(be_chordal_env_t const *const env, ir_node *const irn) /* Compute the admissible registers bitsets. */ for (i = 0; i < insn->n_ops; ++i) { - be_operand_t *op = &insn->ops[i]; - const arch_register_req_t *req = op->req; - const arch_register_class_t *cls = req->cls; - arch_register_req_type_t type = req->type; - - /* If there is no special requirement, we allow current class here */ - if (cls == NULL && req->type == arch_register_req_type_none) { - cls = env->cls; - type = arch_register_req_type_normal; - } - - assert(cls == env->cls); + be_operand_t *const op = &insn->ops[i]; + arch_register_req_t const *const req = op->req; + assert(req->cls == env->cls); - if (type & arch_register_req_type_limited) { + if (req->type & arch_register_req_type_limited) { bitset_t *regs = bitset_obstack_alloc(obst, env->cls->n_regs); rbitset_copy_to_bitset(req->limited, regs); op->regs = regs; -- 2.20.1