This call initializes the node_nr with a random value on startup. This
lets you test wether the compile behaves deterministically regardless of
node numbers (which isn't always the case right now).
#include <signal.h>
#include <string.h>
#include <strings.h>
+#include <time.h>
#include <ctype.h>
"setoutfile name file redirects debug output of module name to file\n"
"irgname name prints address and graph number of a method given by its name\n"
"irgldname ldname prints address and graph number of a method given by its ldname\n"
+ "randnodenr randomize initial node number\n"
"help list all commands\n"
);
}
tok_setoutfile,
tok_showent,
tok_showtype,
+ tok_randnodenr,
tok_identifier,
tok_number,
tok_eof,
"setoutfile",
"showent",
"showtype",
+ "randnodenr",
};
/**
irg_name(name);
break;
+ case tok_randnodenr:
+ dbg_printf("Randomizing initial node number\n");
+ srand(time(0));
+ irp->max_node_nr += rand() % 6666;
+ break;
+
case tok_irgldname:
token = get_token();
if (token != tok_identifier)