Commit e3c8eb86 by Vladimir Makarov Committed by Vladimir Makarov

rtl.def (DEFINE_AUTOMATON): Add description of new options `time' and `v'.

2002-06-18  Vladimir Makarov  <vmakarov@redhat.com>

	* rtl.def (DEFINE_AUTOMATON): Add description of new options
	`time' and `v'.  Fix incorrect description of option `w'.

	* doc/md.texi: Ditto.

	* genautomata.c (TIME_OPTION, V_OPTION): New macros.
	(gen_automata_option): Process the new options.
	(transform_2, transform_3): Initialize some variables.
	(initiate_automaton_gen): Use the new macros.

From-SVN: r54748
parent 83b14b88
2002-06-18 Vladimir Makarov <vmakarov@redhat.com>
* rtl.def (DEFINE_AUTOMATON): Add description of new options
`time' and `v'. Fix incorrect description of option `w'.
* doc/md.texi: Ditto.
* genautomata.c (TIME_OPTION, V_OPTION): New macros.
(gen_automata_option): Process the new options.
(transform_2, transform_3): Initialize some variables.
(initiate_automaton_gen): Use the new macros.
2002-06-18 Richard Sandiford <rsandifo@redhat.com> 2002-06-18 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips-protos.h (mips_initial_elimination_offset): Declare. * config/mips/mips-protos.h (mips_initial_elimination_offset): Declare.
......
...@@ -5596,8 +5596,17 @@ only worth to do when we are going to query CPU functional unit ...@@ -5596,8 +5596,17 @@ only worth to do when we are going to query CPU functional unit
reservations in an automaton state. reservations in an automaton state.
@item @item
@dfn{w} means a generation of the file describing the result @dfn{time} means printing additional time statistics about
automaton. The file can be used to verify the description. generation of automata.
@item
@dfn{v} means a generation of the file describing the result automata.
The file has suffix @samp{.dfa} and can be used for the description
verification and debugging.
@item
@dfn{w} means a generation of warning instead of error for
non-critical errors.
@item @item
@dfn{ndfa} makes nondeterministic finite state automata. This affects @dfn{ndfa} makes nondeterministic finite state automata. This affects
......
...@@ -638,6 +638,10 @@ static struct obstack irp; ...@@ -638,6 +638,10 @@ static struct obstack irp;
#define NO_MINIMIZATION_OPTION "-no-minimization" #define NO_MINIMIZATION_OPTION "-no-minimization"
#define TIME_OPTION "-time"
#define V_OPTION "-v"
#define W_OPTION "-w" #define W_OPTION "-w"
#define NDFA_OPTION "-ndfa" #define NDFA_OPTION "-ndfa"
...@@ -1639,6 +1643,10 @@ gen_automata_option (def) ...@@ -1639,6 +1643,10 @@ gen_automata_option (def)
{ {
if (strcmp ((char *) XSTR (def, 0), NO_MINIMIZATION_OPTION + 1) == 0) if (strcmp ((char *) XSTR (def, 0), NO_MINIMIZATION_OPTION + 1) == 0)
no_minimization_flag = 1; no_minimization_flag = 1;
else if (strcmp ((char *) XSTR (def, 0), TIME_OPTION + 1) == 0)
time_flag = 1;
else if (strcmp ((char *) XSTR (def, 0), V_OPTION + 1) == 0)
v_flag = 1;
else if (strcmp ((char *) XSTR (def, 0), W_OPTION + 1) == 0) else if (strcmp ((char *) XSTR (def, 0), W_OPTION + 1) == 0)
w_flag = 1; w_flag = 1;
else if (strcmp ((char *) XSTR (def, 0), NDFA_OPTION + 1) == 0) else if (strcmp ((char *) XSTR (def, 0), NDFA_OPTION + 1) == 0)
...@@ -4507,9 +4515,9 @@ transform_2 (regexp) ...@@ -4507,9 +4515,9 @@ transform_2 (regexp)
{ {
if (regexp->mode == rm_sequence) if (regexp->mode == rm_sequence)
{ {
regexp_t sequence; regexp_t sequence = NULL;
regexp_t result; regexp_t result;
int sequence_index; int sequence_index = 0;
int i, j; int i, j;
for (i = 0; i < regexp->regexp.sequence.regexps_num; i++) for (i = 0; i < regexp->regexp.sequence.regexps_num; i++)
...@@ -4552,9 +4560,9 @@ transform_2 (regexp) ...@@ -4552,9 +4560,9 @@ transform_2 (regexp)
} }
else if (regexp->mode == rm_allof) else if (regexp->mode == rm_allof)
{ {
regexp_t allof; regexp_t allof = NULL;
regexp_t result; regexp_t result;
int allof_index; int allof_index = 0;
int i, j; int i, j;
for (i = 0; i < regexp->regexp.allof.regexps_num; i++) for (i = 0; i < regexp->regexp.allof.regexps_num; i++)
...@@ -4596,9 +4604,9 @@ transform_2 (regexp) ...@@ -4596,9 +4604,9 @@ transform_2 (regexp)
} }
else if (regexp->mode == rm_oneof) else if (regexp->mode == rm_oneof)
{ {
regexp_t oneof; regexp_t oneof = NULL;
regexp_t result; regexp_t result;
int oneof_index; int oneof_index = 0;
int i, j; int i, j;
for (i = 0; i < regexp->regexp.oneof.regexps_num; i++) for (i = 0; i < regexp->regexp.oneof.regexps_num; i++)
...@@ -4652,8 +4660,8 @@ transform_3 (regexp) ...@@ -4652,8 +4660,8 @@ transform_3 (regexp)
{ {
if (regexp->mode == rm_sequence) if (regexp->mode == rm_sequence)
{ {
regexp_t oneof; regexp_t oneof = NULL;
int oneof_index; int oneof_index = 0;
regexp_t result; regexp_t result;
regexp_t sequence; regexp_t sequence;
int i, j; int i, j;
...@@ -4701,10 +4709,10 @@ transform_3 (regexp) ...@@ -4701,10 +4709,10 @@ transform_3 (regexp)
} }
else if (regexp->mode == rm_allof) else if (regexp->mode == rm_allof)
{ {
regexp_t oneof, seq; regexp_t oneof = NULL, seq;
int oneof_index, max_seq_length, allof_length; int oneof_index = 0, max_seq_length, allof_length;
regexp_t result; regexp_t result;
regexp_t allof, allof_op; regexp_t allof = NULL, allof_op;
int i, j; int i, j;
for (i = 0; i < regexp->regexp.allof.regexps_num; i++) for (i = 0; i < regexp->regexp.allof.regexps_num; i++)
...@@ -9157,9 +9165,9 @@ initiate_automaton_gen (argc, argv) ...@@ -9157,9 +9165,9 @@ initiate_automaton_gen (argc, argv)
for (i = 2; i < argc; i++) for (i = 2; i < argc; i++)
if (strcmp (argv [i], NO_MINIMIZATION_OPTION) == 0) if (strcmp (argv [i], NO_MINIMIZATION_OPTION) == 0)
no_minimization_flag = 1; no_minimization_flag = 1;
else if (strcmp (argv [i], "-time") == 0) else if (strcmp (argv [i], TIME_OPTION) == 0)
time_flag = 1; time_flag = 1;
else if (strcmp (argv [i], "-v") == 0) else if (strcmp (argv [i], V_OPTION) == 0)
v_flag = 1; v_flag = 1;
else if (strcmp (argv [i], W_OPTION) == 0) else if (strcmp (argv [i], W_OPTION) == 0)
w_flag = 1; w_flag = 1;
......
...@@ -419,8 +419,15 @@ DEF_RTL_EXPR(DEFINE_AUTOMATON, "define_automaton", "s", 'x') ...@@ -419,8 +419,15 @@ DEF_RTL_EXPR(DEFINE_AUTOMATON, "define_automaton", "s", 'x')
is only worth to do when we are going to query CPU functional is only worth to do when we are going to query CPU functional
unit reservations in an automaton state. unit reservations in an automaton state.
o "w" which means generation of file describing the result o "time" which means printing additional time statistics about
automaton. The file can be used for the description verification. generation of automata.
o "v" which means generation of file describing the result
automata. The file has suffix `.dfa' and can be used for the
description verification and debugging.
o "w" which means generation of warning instead of error for
non-critical errors.
o "ndfa" which makes nondeterministic finite state automata. */ o "ndfa" which makes nondeterministic finite state automata. */
DEF_RTL_EXPR(AUTOMATA_OPTION, "automata_option", "s", 'x') DEF_RTL_EXPR(AUTOMATA_OPTION, "automata_option", "s", 'x')
......
Markdown is supported
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