summaryrefslogtreecommitdiffhomepage
path: root/ir/be/benode.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-27 20:00:42 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-27 21:15:41 +0200
commit4652701dd62546a5a9fbcafddb990784e3493631 (patch)
treea113531e9d1bc9a5a698806d30c947a3172ce64e /ir/be/benode.c
parent54cbed23d0edb1ceef45c133660eaa735ceff387 (diff)
be: Remove pointless null pointer checks.
Nodes without requirements are never operands of a {Copy,}Keep.
Diffstat (limited to 'ir/be/benode.c')
-rw-r--r--ir/be/benode.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ir/be/benode.c b/ir/be/benode.c
index 74453c9..6bb5b76 100644
--- a/ir/be/benode.c
+++ b/ir/be/benode.c
@@ -230,9 +230,8 @@ ir_node *be_new_Keep(ir_node *const block, int const n,
attr->exc.pin_state = op_pin_state_pinned;
for (int i = 0; i < n; ++i) {
- arch_register_req_t const *req = arch_get_irn_register_req(in[i]);
- req = req->cls != NULL ? req->cls->class_req : arch_no_register_req;
- be_node_set_register_req_in(res, i, req);
+ arch_register_req_t const *const req = arch_get_irn_register_req(in[i]);
+ be_node_set_register_req_in(res, i, req->cls->class_req);
}
keep_alive(res);
return res;
@@ -276,9 +275,8 @@ ir_node *be_new_CopyKeep(ir_node *const bl, ir_node *const src, int const n, ir_
set_copy_info(irn, irg, src, arch_irn_flag_schedule_first);
for (int i = 0; i < n; ++i) {
ir_node *pred = in_keep[i];
- const arch_register_req_t *req = arch_get_irn_register_req(pred);
- req = req->cls != NULL ? req->cls->class_req : arch_no_register_req;
- be_node_set_register_req_in(irn, i+1, req);
+ arch_register_req_t const *const req = arch_get_irn_register_req(pred);
+ be_node_set_register_req_in(irn, i + 1, req->cls->class_req);
}
return irn;
}