/*
- * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
- *
* This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
*/
/**
#include "irprintf.h"
#include "debug.h"
#include "error.h"
+#include "util.h"
/**
* walker environment
mem = get_Alloc_mem(alloc);
blk = get_nodes_block(alloc);
- turn_into_tuple(alloc, pn_Alloc_max+1);
- set_Tuple_pred(alloc, pn_Alloc_M, mem);
- set_Tuple_pred(alloc, pn_Alloc_X_regular, new_r_Jmp(blk));
- set_Tuple_pred(alloc, pn_Alloc_X_except, new_r_Bad(irg, mode_X));
+ ir_node *const in[] = {
+ [pn_Alloc_M] = mem,
+ [pn_Alloc_X_regular] = new_r_Jmp(blk),
+ [pn_Alloc_X_except] = new_r_Bad(irg, mode_X),
+ };
+ turn_into_tuple(alloc, ARRAY_SIZE(in), in);
++env->nr_deads;
}
sel = new_rd_simpleSel(dbg, get_nodes_block(alloc), get_irg_no_mem(irg), get_irg_frame(irg), ent);
mem = get_Alloc_mem(alloc);
- turn_into_tuple(alloc, pn_Alloc_max+1);
- set_Tuple_pred(alloc, pn_Alloc_M, mem);
- set_Tuple_pred(alloc, pn_Alloc_X_regular, new_r_Jmp(blk));
- set_Tuple_pred(alloc, pn_Alloc_X_except, new_r_Bad(irg, mode_X));
- set_Tuple_pred(alloc, pn_Alloc_res, sel);
+ ir_node *const in[] = {
+ [pn_Alloc_M] = mem,
+ [pn_Alloc_res] = sel,
+ [pn_Alloc_X_regular] = new_r_Jmp(blk),
+ [pn_Alloc_X_except] = new_r_Bad(irg, mode_X),
+ };
+ turn_into_tuple(alloc, ARRAY_SIZE(in), in);
++env->nr_removed;
}
/* if allocs were removed somehow */
if (env->nr_removed && env->nr_deads) {
- /* exception control flow might have been changed */
- clear_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE);
+ confirm_irg_properties(irg, IR_GRAPH_PROPERTIES_NONE);
}
}
mem = get_Call_mem(call);
blk = get_nodes_block(call);
- turn_into_tuple(call, pn_Call_max+1);
- set_Tuple_pred(call, pn_Call_M, mem);
- set_Tuple_pred(call, pn_Call_X_regular, new_r_Jmp(blk));
- set_Tuple_pred(call, pn_Call_X_except, new_r_Bad(irg, mode_X));
- set_Tuple_pred(call, pn_Call_T_result, new_r_Bad(irg, mode_T));
+ ir_node *const in[] = {
+ [pn_Call_M] = mem,
+ [pn_Call_T_result] = new_r_Bad(irg, mode_T),
+ [pn_Call_X_regular] = new_r_Jmp(blk),
+ [pn_Call_X_except] = new_r_Bad(irg, mode_X),
+ };
+ turn_into_tuple(call, ARRAY_SIZE(in), in);
++env->nr_deads;
}
for (call = env->found_allocs; call; call = next) {
next = (ir_node*)get_irn_link(call);
}
+
+ confirm_irg_properties(irg, IR_GRAPH_PROPERTIES_NONE);
}
for (i = 0, n = get_irp_n_irgs(); i < n; ++i) {
ir_graph *irg = get_irp_irg(i);
- assure_irg_outs(irg);
+ assure_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_OUTS);
if (callback) {
/* search for Calls */