[m-rev.] diff: exploit the new capability of switch detection
Zoltan Somogyi
zs at cs.mu.OZ.AU
Mon Sep 19 18:02:14 AEST 2005
The change to switch detection has now been installed on all our machines.
Zoltan.
compiler/dupelim.m:
Factor out some common code using the new capability of switch
detection.
configure.in:
Require the installed compiler to have this capability.
Unrelated: also add a test for posix_memalign.
cvs diff: Diffing .
Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.430
diff -u -b -r1.430 configure.in
--- configure.in 13 Sep 2005 06:11:02 -0000 1.430
+++ configure.in 13 Sep 2005 08:41:32 -0000
@@ -199,6 +199,8 @@
main(!IO) :-
return_rtti_version(Version),
+ p(T),
+ q(T, _),
(
Version >= 8,
ac(2) ^ elem(3, 5) = 17,
@@ -209,6 +211,23 @@
io.print("Nope.\n", !IO)
).
+ :- type t ---> a ; b ; c(int).
+
+ :- pred p(t::out) is det.
+
+ p(b).
+
+ :- pred q(t::in, int::out) is det.
+
+ q(T, N) :-
+ (
+ T = a,
+ N = 0
+ ;
+ ( T = b ; T = c(_) ),
+ N = 1
+ ).
+
:- type a ---> ac(int).
:- func a ^ elem(int, int) = int.
@@ -833,7 +852,7 @@
mercury_check_for_functions \
sysconf getpagesize gethostname \
- mprotect memalign memmove \
+ mprotect memalign posix_memalign memmove \
sigaction siginterrupt setitimer \
snprintf _snprintf vsnprintf _vsnprintf strerror \
open close dup dup2 fdopen fileno fstat stat lstat isatty \
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/dupelim.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dupelim.m,v
retrieving revision 1.69
diff -u -b -r1.69 dupelim.m
--- compiler/dupelim.m 14 Sep 2005 01:29:08 -0000 1.69
+++ compiler/dupelim.m 14 Sep 2005 03:33:44 -0000
@@ -733,131 +733,34 @@
MaybeInstr = no
)
;
- Instr1 = livevals(_),
+ ( Instr1 = livevals(_)
+ ; Instr1 = block(_, _, _)
+ ; Instr1 = call(_, _, _, _, _, _)
+ ; Instr1 = mkframe(_, _)
+ ; Instr1 = label(_)
+ ; Instr1 = goto(_)
+ ; Instr1 = computed_goto(_, _)
+ ; Instr1 = c_code(_, _)
+ ; Instr1 = save_maxfr(_)
+ ; Instr1 = restore_maxfr(_)
+ ; Instr1 = discard_ticket
+ ; Instr1 = prune_ticket
+ ; Instr1 = incr_sp(_, _)
+ ; Instr1 = decr_sp(_)
+ ; Instr1 = pragma_c(_, _, _, _, _, _, _, _, _)
+ ),
( Instr1 = Instr2 ->
MaybeInstr = yes(Instr1)
;
MaybeInstr = no
)
;
- Instr1 = block(_, _, _),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = call(_, _, _, _, _, _),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = mkframe(_, _),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = label(_),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = goto(_),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = computed_goto(_, _),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = c_code(_, _),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = save_maxfr(_),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = restore_maxfr(_),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = discard_ticket,
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = prune_ticket,
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = incr_sp(_, _),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = decr_sp(_),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = decr_sp_and_return(_),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = pragma_c(_, _, _, _, _, _, _, _, _),
- ( Instr1 = Instr2 ->
- MaybeInstr = yes(Instr1)
- ;
- MaybeInstr = no
- )
- ;
- Instr1 = comment(_),
- MaybeInstr = no
- ;
- Instr1 = fork(_, _, _),
- MaybeInstr = no
- ;
- Instr1 = init_sync_term(_, _),
- MaybeInstr = no
- ;
- Instr1 = join_and_continue(_, _),
- MaybeInstr = no
- ;
- Instr1 = join_and_terminate(_),
+ ( Instr1 = comment(_)
+ ; Instr1 = fork(_, _, _)
+ ; Instr1 = init_sync_term(_, _)
+ ; Instr1 = join_and_continue(_, _)
+ ; Instr1 = join_and_terminate(_)
+ ),
MaybeInstr = no
).
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
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