summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beprefalloc.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/beprefalloc.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/beprefalloc.c')
-rw-r--r--ir/be/beprefalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/beprefalloc.c b/ir/be/beprefalloc.c
index f13bf00..815d1f7 100644
--- a/ir/be/beprefalloc.c
+++ b/ir/be/beprefalloc.c
@@ -861,12 +861,12 @@ static void permute_values(ir_nodeset_t *live_nodes, ir_node *before,
unsigned width = 1; /* TODO */
- ir_node *proj0 = new_r_Proj(perm, get_irn_mode(in[0]), 0);
+ ir_node *const proj0 = be_new_Proj(perm, 0);
mark_as_copy_of(proj0, in[0]);
const arch_register_t *reg0 = arch_register_for_index(cls, old_r);
use_reg(proj0, reg0, width);
- ir_node *proj1 = new_r_Proj(perm, get_irn_mode(in[1]), 1);
+ ir_node *const proj1 = be_new_Proj(perm, 1);
mark_as_copy_of(proj1, in[1]);
const arch_register_t *reg1 = arch_register_for_index(cls, r2);
use_reg(proj1, reg1, width);