[m-rev.] diff: test constant propagation
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Feb 12 09:52:35 AEDT 2004
On 11-Feb-2004, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> You might want to consider s/5678.0/'5678\.0'/
Done.
----------
Estimated hours taken: 0.25
Branches: main
Some fixes for my recently-added constant propagation tests.
tests/hard_coded/Mmakefile:
Apply a suggestion from Ralph's review comments: ensure that
the "." in the grep pattern "5678.0" is properly escaped so
that it only matches a literal "." character rather than matching
any character.
(Another alternative would be to use `fgrep', but Posix deprecates
fgrep, and I'm not sure whether the Posix alternative `grep -f' is
portable.)
tests/hard_coded/Mercury.options:
Add `--trace-optimized' to MCFLAGS for the constant_prop_1 test case.
This is needed to ensure that it passes in debug grades.
Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: tests/hard_coded/Mercury.options
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/Mercury.options,v
retrieving revision 1.9
diff -u -d -r1.9 Mercury.options
--- tests/hard_coded/Mercury.options 10 Feb 2004 13:13:10 -0000 1.9
+++ tests/hard_coded/Mercury.options 11 Feb 2004 22:44:52 -0000
@@ -86,6 +86,7 @@
--runtime-flags "--heap-size 70000 --mdb-out \"mdb\\mdb out\""
MLFLAGS-rational_test = --runtime-flags "--heap-size 20000"
-MCFLAGS-constant_prop_1 = --optimize-constant-propagation
+MCFLAGS-constant_prop_1 = --optimize-constant-propagation \
+ --trace-optimized
MCFLAGS-constant_prop_2 = --optimize-constant-propagation \
--optimize-dead-procs --trace-optimized
Index: tests/hard_coded/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/hard_coded/Mmakefile,v
retrieving revision 1.224
diff -u -d -r1.224 Mmakefile
--- tests/hard_coded/Mmakefile 10 Feb 2004 13:18:44 -0000 1.224
+++ tests/hard_coded/Mmakefile 11 Feb 2004 22:48:12 -0000
@@ -467,23 +467,23 @@
constant_prop_1.c: constant_prop_1.c_date
grep foobar $@
grep 1234 $@
- grep 5678.0 $@
+ grep '5678\.0' $@
constant_prop_1.s: constant_prop_1.s_date
grep foobar $@
grep 1234 $@
- grep 5678.0 $@
+ grep '5678\.0' $@
constant_prop_1.pic_s: constant_prop_1.pic_s_date
grep foobar $@
grep 1234 $@
- grep 5678.0 $@
+ grep '5678\.0' $@
constant_prop_1.java: constant_prop_1.java_date
grep foobar $@
grep 1234 $@
- grep 5678.0 $@
+ grep '5678\.0' $@
constant_prop_1.il: constant_prop_1.il_date
grep foobar $@
grep 1234 $@
- grep 5678.0 $@
+ grep '5678\.0' $@
#-----------------------------------------------------------------------------#
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list