mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
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.
2 lines
8 B
Plaintext
2 lines
8 B
Plaintext
X = 100
|