Commit c1230515 authored by Michael Beck's avatar Michael Beck
Browse files

BugFix:

new_rd_*() must ALWAYS set the current_ir_graph to the irg argument, otherwise
optimize_node() runs on the wrong irg, causing newly created nodes be put
onto the wrong value_table!

[r25227]
parent f911157d
......@@ -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");
......
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