Files
mercury/tests/hard_coded/bad_indirect_reuse2b.exp
Peter Wang 76f4872f29 Revert my previous change to avoid making some bad indirect reuse calls,
Branches: main

Revert my previous change to avoid making some bad indirect reuse calls,
which supposed that the verification of calls to reuse procedures was wrong.
It seems to be correct, as far as it goes.

There were actually a few separate problems elsewhere:

1. `reuse_conditions_add_condition' didn't add a condition to a set if the
set already contains another condition which subsumes it.  However, the
problem in the `bad_indirect_reuse' test case was due to discarding such a
condition, making the reuse conditions on a reuse procedure too weak.  For
now, keep all non-duplicate reuse conditions so this doesn't happen.

2. `livedata_init_at_goal' was missing quite a lot of code that was in the
old reuse branch, so the set of known live data at each call site was too
small.  Port over the missing code from the reuse branch.  This fixes the
`bad_indirect_reuse2' test case.

3. Although a call might satisfy all the reuse conditions of the callee
individually, we weren't checking that two input arguments didn't have
sharing between them.  Port over code from the old reuse branch to check
this.  This fixes the `bad_indirect_reuse3' test case.


compiler/ctgc.livedata.m:
	Fix problem 2.

	Revert my previous change.

compiler/structure_reuse.domain.m:
	Work around problem 1.

	Fix problem 3.

compiler/structure_reuse.indirect.m:
compiler/structure_sharing.domain.m:
	Revert my previous change.

compiler/ctgc.datastruct.m:
	Add a utility predicate.

tests/hard_coded/Mercury.options:
tests/hard_coded/Mmakefile:
tests/hard_coded/bad_indirect_reuse2b.exp:
tests/hard_coded/bad_indirect_reuse2b.m:
	Add a simpler version of bad_indirect_reuse2.
2008-04-23 05:16:50 +00:00

3 lines
26 B
Plaintext