Commit 902f7c4a authored by Matthias Braun's avatar Matthias Braun
Browse files

beflags: add missing liveness updates

parent 19af34b2
......@@ -123,6 +123,8 @@ static void move_other_uses(ir_node *node, ir_node *copy)
ir_node *succ = get_edge_src_irn(edge);
if (irn_visited(succ) && succ != copy_prev &&
value_strictly_dominates(copy, succ)) {
ir_graph *irg = get_irn_irg(succ);
be_lv_t *lv = be_get_irg_liveness(irg);
if (new_proj == NULL) {
ir_mode *proj_mode = get_irn_mode(proj);
int pn = get_Proj_proj(proj);
......@@ -130,6 +132,8 @@ static void move_other_uses(ir_node *node, ir_node *copy)
}
int n = get_edge_src_pos(edge);
set_irn_n(succ, n, new_proj);
be_liveness_update(lv, proj);
be_liveness_update(lv, new_proj);
}
}
}
......
......@@ -41,6 +41,7 @@
#include "be.h"
#include "be_t.h"
#include "beirgmod.h"
#include "belive_t.h"
#include "beblocksched.h"
#include "bespillutil.h"
#include "bespillslots.h"
......@@ -671,6 +672,10 @@ static bool ia32_try_replace_flags(ir_node *consumers, ir_node *flags, ir_node *
ir_node *proj = new_r_Proj(available, flag_mode, pn);
arch_set_irn_register(proj, flag_reg);
set_irn_n(c, i, proj);
ir_graph *irg = get_irn_irg(in);
be_lv_t *lv = be_get_irg_liveness(irg);
be_liveness_introduce(lv, proj);
be_liveness_update(lv, in);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment