X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=scripts%2Fgen_ir.pl;h=70cc946f3c0197efd9a499b239fcb69d323c0aee;hb=41fac672b8f412b67e502dff0f9b03af6ceaef73;hp=a5d2f4e029c10b6a5976230809dc06e1ec221354;hpb=20c5275b37ba3a7d5d3a6adadd88ca47982e2df8;p=libfirm diff --git a/scripts/gen_ir.pl b/scripts/gen_ir.pl index a5d2f4e02..70cc946f3 100755 --- a/scripts/gen_ir.pl +++ b/scripts/gen_ir.pl @@ -179,6 +179,8 @@ foreach my $nodename (keys(%nodes)) { push(@text_cons, ")\n{\n". "\tir_node *res;\n"); + push(@text_cons, "\tir_graph *rem = current_ir_graph;\n"); + my $in_array = "NULL"; if ($arity eq $ARITY_VARIABLE) { $in_array = "in"; @@ -192,6 +194,8 @@ foreach my $nodename (keys(%nodes)) { } } + push(@text_cons, "\tcurrent_ir_graph = irg;\n"); + push(@text_cons, "\tres = new_ir_node(db, irg, $block_name, op_$op_name, $mode_name, $arity, $in_array);\n"); if (exists($node{"attrs"})) { @@ -217,6 +221,7 @@ foreach my $nodename (keys(%nodes)) { } push(@text_cons, "\tIRN_VRFY_IRG(res, irg);\n". + "\tcurrent_ir_graph = rem;\n". "\treturn res;\n". "}\n\n");