R. Clayton (rclayton@clayton.cs.monmouth.edu)
Wed, 17 Jan 2001 19:01:09 -0500 (EST)
The shell script
/export/opt/cs-509/pa3/gen-icode
generates some random intermediate code and writes it to std-out. Because the
code is randomly generated, you shouldn't expect to be able to optimize it too
much. Probably the best way to use it is like this:
Generate some random intermediate code and store it in the file in.
$ /export/opt/cs-509/pa3/gen-icode > in
Run the peephole optimizer po (or whatever you've called it), feeding it the
file in and capturing the output in the file out. The pattern file /dev/null
is empty, so no patterns will be defined and the input should be the same as
the output.
$ po /dev/null < in > out
Compare the input to the output; they should be the same. The -w option to
diff ignores the difference in white space between the two files; because
white space is not significant, you should not bother preserving it in the
intermediate code.
$ diff -w in out
Clean up.
$ rm in out
This archive was generated by hypermail 2.0b3 on Thu May 17 2001 - 12:00:05 EDT