summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beutil.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/beutil.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/beutil.c')
-rw-r--r--ir/be/beutil.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ir/be/beutil.c b/ir/be/beutil.c
index dad3245..2e3c20f 100644
--- a/ir/be/beutil.c
+++ b/ir/be/beutil.c
@@ -90,9 +90,8 @@ ir_node *insert_Perm_before(ir_graph *irg, const arch_register_class_t *cls,
free(nodes);
for (size_t i = 0; i < n; ++i) {
- ir_node *perm_op = get_irn_n(perm, i);
- ir_mode *mode = get_irn_mode(perm_op);
- ir_node *proj = new_r_Proj(perm, mode, i);
+ ir_node *const perm_op = get_irn_n(perm, i);
+ ir_node *const proj = be_new_Proj(perm, i);
be_ssa_construction_env_t senv;
be_ssa_construction_init(&senv, irg);