Files
mercury/tests/trailing/tu_test2.exp
Julien Fischer b8fd14de7e Fix a bug with trail usage optimization that was causing it to break the G12
Estimated hours taken: 10
Branches: main, release

Fix a bug with trail usage optimization that was causing it to break the G12
fd tests.  The problem was that the optimization we were applying to model_non
disjunctions was incorrect - instead of considering trail updates along all
forward execution paths from the creation of a choicepoint to the commit, it
was only considering updates along parts of those paths.

The fix (for now) is to remove that particular part of the optimization.
(It will be possible to reinstate part of the optimization but doing so
requires creating trail specialized versions of procedures -
something that we don't currently have support for.)

compiler/trailing_analysis.m:
	Treat any goal that creates a choicepoint as potentially modifying
	the trail.

compiler/add_trail_ops.m:
	Modify the MLDS code generator to conform to the above.

compiler/code_model.m:
compiler/disj_gen.m:
compiler/ite_gen.m:
	Do the same for the LLDS code generator.

tests/trailing/tu_test1.{m,exp}:
	Test case for the above bug.

tests/trailing/tu_test2.{m,exp}:
	Test that trail usage optimization of semidet if-then-else
	conditions still works.

tests/trailing/Makefile:
tests/trailing/Mercury.options:
	Enable the new test cases.
2006-09-06 04:04:18 +00:00

2 lines
8 B
Plaintext