add kills to variables declared in the same scope when autodetecting
commit39b40b37e1c5c39806193184e6e2a4434c207ec3
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 1 Mar 2016 09:04:18 +0000 (1 10:04 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 7 Mar 2016 11:13:53 +0000 (7 12:13 +0100)
tree10caec9f1b9e953589d74a53fce8b314cb714485
parent01656c08c47b428f33645e9c8b4336400d16b28d
add kills to variables declared in the same scope when autodetecting

Commit 0b5e73f (add kills to variables declared in the same scope that
holds the scop, Wed Dec 16 18:35:48 2015 +0100) introduced a mechanism
for killing variables that are declared outside the scop, but it would
only do this for explicitly marked scops.  When autodetecting, there is
less need for such a mechanism because the entire function body can
often be extracted as a scop, in which case the variables declared
inside that scop are already killed.  However, this is not always
the case.  For example, the function may contain a return statement
at the end, which is currently not included in the scop.
Perform a similar killing of variables declared before the scop
and not used after the extracted scop when autodetecting.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc
tests/autodetect/decl4.c [new file with mode: 0644]
tests/autodetect/decl4.scop [new file with mode: 0644]
tests/autodetect/decl5.c [new file with mode: 0644]
tests/autodetect/decl5.scop [new file with mode: 0644]
tests/autodetect/loop4.scop