PetScan::extract_argument: mark non-const pointer arguments as potential writes
commitd4d60a67e77b6edf6a9e9f1b897739f4790ee141
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 2 Apr 2015 09:46:33 +0000 (2 11:46 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 2 Apr 2015 13:01:38 +0000 (2 15:01 +0200)
tree164e871d23523a2942263212461873b29bcf42f6
parent6503e92aee87887ee42061c13dda5a26c10f683d
PetScan::extract_argument: mark non-const pointer arguments as potential writes

The initial version of pet followed the convention that if a function
takes a pointer to const that then the passed array is read,
while if it takes a pointer to non-const that then the passed array
is completely written.  This convention has remained even after
the introduction of the distinction between may-writes and must-writes.
Change it now to only mark the accessed elements as possibly being written to.
At the same time, retain the fact that the elements may also be read by
the function.  These access relations can always be refined by the user
by providing a summary function.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc
tests/QR.scop
tests/arg.scop
tests/array.scop
tests/conditional_assignment.scop
tests/conditional_assignment2.scop
tests/data_dependent.scop
tests/struct9.scop
tests/wdp.scop
tests/write.scop
tests/write2.scop