Commit ddb1eaec authored by Christoph Mallon's avatar Christoph Mallon
Browse files

be: Remove be_ssa_destruction_check().

This only checked that Phis are NOPs.
be_verify_register_allocation() does the same and more.
parent 8d3b093a
......@@ -244,13 +244,6 @@ static void post_spill(be_chordal_env_t *const chordal_env, ir_graph *const irg,
dump(BE_CH_DUMP_SSADESTR, irg, chordal_env->cls, "ssadestr");
if (be_options.do_verify) {
bool fine = be_ssa_destruction_check(chordal_env->irg, chordal_env->cls);
be_check_verify_result(fine, chordal_env->irg);
/* the ifg exists only if there are allocatable regs */
......@@ -242,31 +242,3 @@ void be_ssa_destruction(ir_graph *irg, const arch_register_class_t *cls)
/* unfortunately updating doesn't work yet. */
static void ssa_destruction_check_walker(ir_node *block, void *data)
const arch_register_class_t *cls = (const arch_register_class_t*)data;
for (ir_node *phi = sched_first(block); is_Phi(phi); phi = sched_next(phi)) {
if (!arch_irn_consider_in_reg_alloc(cls, phi))
/* iterate over all args of phi */
foreach_irn_in(phi, i, arg) {
const arch_register_req_t *req = arch_get_irn_register_req(arg);
if (req->ignore)
assert(arch_get_irn_register(phi) == arch_get_irn_register(arg));
bool be_ssa_destruction_check(ir_graph *irg, const arch_register_class_t *cls)
irg_block_walk_graph(irg, ssa_destruction_check_walker, NULL, (void*)cls);
/* well we didn't run into an assertion failure so we are fine.
* (I'm too lazy to rewrite the code to not use assert() now as it will
* get replaced with a new reg verifier anyway) */
return true;
......@@ -20,6 +20,5 @@
* Performs SSA destruction. Arguments get adjusted, phi nodes just stay.
void be_ssa_destruction(ir_graph *irg, const arch_register_class_t *cls);
bool be_ssa_destruction_check(ir_graph *irg, const arch_register_class_t *cls);
Supports Markdown
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