* This is useful if a node returning a tuple is removed, but the Projs
* extracting values from the tuple are not available.
*/
-void turn_into_tuple(ir_node *node, int arity) {
+void turn_into_tuple(ir_node *node, int arity)
+{
assert(node);
set_irn_op(node, op_Tuple);
if (get_irn_arity(node) == arity) {
* Since `new' may be bigger than `old' replace `old'
* by an op_Id which is smaller than everything.
*/
-void exchange(ir_node *old, ir_node *nw) {
+void exchange(ir_node *old, ir_node *nw)
+{
ir_graph *irg;
assert(old && nw);
* all Proj nodes to there predecessors and all
* partBlocks to there MacroBlock header.
*/
-static void collect_phiprojs_walker(ir_node *n, void *env) {
+static void collect_phiprojs_walker(ir_node *n, void *env)
+{
ir_node *pred;
(void) env;
}
}
-void collect_phiprojs(ir_graph *irg) {
+void collect_phiprojs(ir_graph *irg)
+{
assert((ir_resources_reserved(irg) & (IR_RESOURCE_IRN_LINK|IR_RESOURCE_PHI_LIST)) ==
(IR_RESOURCE_IRN_LINK|IR_RESOURCE_PHI_LIST));
irg_walk_graph(irg, firm_clear_node_and_phi_links, collect_phiprojs_walker, NULL);
* Moves node and all predecessors of node from from_bl to to_bl.
* Does not move predecessors of Phi nodes (or block nodes).
*/
-static void move(ir_node *node, ir_node *from_bl, ir_node *to_bl) {
+static void move(ir_node *node, ir_node *from_bl, ir_node *to_bl)
+{
int i, arity;
/* move this node */
}
}
-void part_block(ir_node *node) {
+void part_block(ir_node *node)
+{
ir_node *new_block, *old_block, *mbh;
ir_node *phi, *jmp, *next, *block;
ir_graph *rem = current_ir_graph;
- current_ir_graph = get_irn_irg(node);
-
/* Turn off optimizations so that blocks are not merged again. */
int rem_opt = get_opt_optimize();
set_optimize(0);
+ current_ir_graph = get_irn_irg(node);
+
/* Transform the control flow */
old_block = get_nodes_block(node);
mbh = get_Block_MacroBlock(old_block);
}
/* kill a node by setting its predecessors to Bad and finally exchange the node by Bad itself. */
-void kill_node(ir_node *node) {
+void kill_node(ir_node *node)
+{
ir_graph *irg = get_irn_irg(node);
ir_node *bad = get_irg_bad(irg);
int i;