summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bearch.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-27 21:52:04 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-28 10:36:31 +0200
commit9a6b8525e9916f0b0448468defd150413814ecfe (patch)
tree8560176b7b598b84c47f88efd0f6dbaff2cb5679 /ir/be/bearch.c
parent6a3abbe420b99019efd3e8a51bfce4e3cf713d5b (diff)
be: Add and use be_new_Proj().
It is like new_r_Proj(), but the mode is determined automatically from the out requirement of the predecessor. This probably resolves some mode mismatches in untested code paths -- AMD64 backend and SPARC hard float, I'm looking at you!
Diffstat (limited to 'ir/be/bearch.c')
-rw-r--r--ir/be/bearch.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ir/be/bearch.c b/ir/be/bearch.c
index 54cb329..b1cbaef 100644
--- a/ir/be/bearch.c
+++ b/ir/be/bearch.c
@@ -171,9 +171,8 @@ ir_node *be_get_start_proj(ir_graph *const irg, be_start_info_t *const info)
{
if (!info->irn) {
/* This is already the transformed start node. */
- ir_node *const start = get_irg_start(irg);
- arch_register_class_t const *const cls = arch_get_irn_register_req_out(start, info->pos)->cls;
- info->irn = new_r_Proj(start, cls->mode, info->pos);
+ ir_node *const start = get_irg_start(irg);
+ info->irn = be_new_Proj(start, info->pos);
}
return info->irn;
}