mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-24 13:53:54 +00:00
Estimated hours taken: 12
Bug fixes.
tests/term/arit_exp.m still fails with --intermodule-optimization
due to a slightly different (but correct) trans_opt file being produced.
compiler/simplify.m
Don't produce singleton disjunctions, since the code generator
barfs on them. Use a `some' instead.
Test case: tests/general/partition.m compiled with --deforestation.
compiler/unused_args.m
Deconstructions where the arguments included `any' insts were
not being handled correctly, due to inst_matches_binding
failing for any->any.
Test case: extras/trailed_update/samples/vqueens.m at -O3.
Don't warn about predicates from `.opt' files having unused
arguments, because in most cases the warning will be generated
when compiling the imported module.
compiler/higher_order.m
Fix a bug that caused compiler/modules.m to be miscompiled at
-O3 --intermodule-optimization, due to curried arguments for
multiple known higher-order arguments being passed to a
specialised version in the wrong order.
Test case: tests/hard_coded/ho_order2.m
compiler/mercury_compile.m
Call intermod__update_pred_import_status when compiling to
C at the same stage of the compilation as the `.opt' file
was written to ensure that the same information is being used.
Test case: tests/hard_coded/rational_test.m compiled with
--intermodule-optimization failed because of a link error.
Make sure polymorphism has been run before doing unused argument
checking with --errorcheck-only. Otherwise the argument indices
read in from `.opt' files are incorrect.
compiler/intermod.m
Use code_util__compiler_generated to test if a called predicate
is compiler generated, rather than looking for a call_unify_context
(function calls have a call_unify_context).
Add a progress message for updating the import status of predicates
exported to `.opt' files.
Fix a bug where the unused_args pragmas read in from the current
module's `.opt' file were given an import_status of `imported' rather
than `opt_imported' resulting in an error message from make_hlds.m.
compiler/dead_proc_elim.m
Ensure that predicates used by instance declarations and
`:- pragma export's are not eliminated by the dead_pred_elim
pass before typechecking.
Test case: most of the typeclass tests compiled with
--intermodule-optimization.
compiler/hlds_goal.m
Remove obsolete comments about the modes of a higher-order
unification being incorrect after polymorphism, since that
was fixed months ago.
compiler/options.m
Reenable deforestation.
Enable --intermodule-optimization and --intermod-unused-args
at -O5 so they get tested occasionally.
compiler/handle_options.m
Disable deforestation if --typeinfo-liveness is set, since
there are bugs in the folding code if extra typeinfos are
added to a new predicate's arguments by hlds_pred__define_new_pred.
Disable higher_order.m if --typeinfo-liveness is set, since
higher_order.m currently does not pass all necessary typeinfos
to specialised versions or update the typeinfo_varmap of
specialised versions.
Test case: tests/valid/agc_ho_pred.m
tests/hard_coded/ho_order2.m
tests/hard_coded/ho_order2.exp
Test case for higher_order.m.
tools/test_mercury
Added --intermod-unused-args to the options for murlibobo.
extras/trailed_update/{samples,tests}/Mmakefile
Add "-I.." to MGNUCFLAGS so gcc can find unsafe.h which
is #included in c_header_code read from unsafe.opt.
79 lines
1.9 KiB
Plaintext
79 lines
1.9 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
# Copyright (C) 1997-1998 The University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU Library General
|
|
# Public License - see the file COPYING.LIB in the Mercury distribution.
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
MAIN_TARGET = all
|
|
|
|
# We need to use a grade with trailing
|
|
GRADEFLAGS += --use-trail
|
|
|
|
MCFLAGS = --infer-all
|
|
|
|
MGNUCFLAGS=-g -I..
|
|
RM_C=:
|
|
MLFLAGS=-g
|
|
|
|
# Link in the trailed_update library from ..
|
|
MCFLAGS += -I.. $(EXTRA_MCFLAGS)
|
|
MLFLAGS += -R`pwd`/.. -L.. $(EXTRA_MLFLAGS)
|
|
MLLIBS = -ltrailed_update $(EXTRA_MLLIBS)
|
|
VPATH = ..:$(MMAKE_VPATH)
|
|
C2INITFLAGS = ../trailed_update.init
|
|
%_init.c: $(C2INITFLAGS)
|
|
|
|
# We need the following to use shared libraries on Linux
|
|
#MGNUCFLAGS += -DPIC_REG
|
|
#MLFLAGS += --shared
|
|
|
|
MLFLAGS += --static
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
PROGS = interpreter vqueens
|
|
|
|
DEPENDS = $(PROGS:%=%.depend)
|
|
CS = $(PROGS:%=%.c)
|
|
RESS = $(PROGS:%=%.res)
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
$(PROGS): ../libtrailed_update.a
|
|
|
|
%.out: %
|
|
./$< > $@ 2>&1;
|
|
|
|
%.res: %.exp %.out
|
|
diff -c $*.exp $*.out > $@
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
interpreter.out: interpreter interpreter.inp
|
|
./interpreter interpreter.m < interpreter.inp > interpreter.out
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
.PHONY: depend
|
|
depend: $(DEPENDS)
|
|
|
|
.PHONY: all
|
|
all: $(PROGS)
|
|
|
|
.PHONY: check
|
|
# XXX the test of `interpreter' is disabled,
|
|
# since it fails in grade asm_fast.tr.
|
|
# (It fails due to a bug in value numbering which causes
|
|
# parts of the Mercury library to be miscompiled.)
|
|
check: vqueens.res
|
|
# check: $(RESS)
|
|
|
|
.PHONY: cs
|
|
cs: $(CS)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f *.out *.res
|
|
|
|
#-----------------------------------------------------------------------------#
|