R. Clayton (rclayton@clayton.cs.monmouth.edu)
Wed, 17 Jan 2001 19:01:09 -0500 (EST)
What is the maximum line size allowed in a pattern file and intermediate
file?
None; each line may be arbitrarily long.
I assume you want us to check for undefined pattern. What should the
handling be in case of an undefined pattern?
You should, but it's more important that you get something working with input
you assume is correct. Once you get that, you can go back and bullet-proof
your code.
Should we ignore the undefined pattern but still process other well defined
patterns in the pattern file (if any)?
You can if you want; I just print an error message and exit.
Do you want us to do any other checking on the patterns other than the
undefined pattern case?
Generally speaking, you should check each pattern to make sure it's correct;
but again, it's more important that you get something going with input you've
assumed is correct.
Can a pattern variable represent an operator and a number inclusive (or an
operator and a memory inclusive).
A pattern variable can match an instruction, a memory reference, a constant, or
an operator. A pattern variable can only match one of those four things; it
can't, for example match both the operator and value in an instruction. For
example the pattern $1 = $2 $3 is syntactically incorrect.
Can more than one pattern match the same line(s) in the intermediate file?
If so, how do you expect us to handle the that case? I assume only the first
match will need to be handled.
You apply the patterns to the intermediate code one at a time. A particular
instruction may be matched by several patterns over the course of an
optimization, but at any one time during the optimization, the instruction will
be matched by at most one pattern. You should keep matching patterns until
none of the patterns match the intermediate code (or there's no more
intermediate code left to match).
This archive was generated by hypermail 2.0b3 on Thu May 17 2001 - 12:00:05 EDT