add support for (single) declarations
commit7af3821eabd6bdb7030d8121f0093b1b168e6709
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 17 Apr 2012 07:57:35 +0000 (17 09:57 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 8 Nov 2012 14:07:48 +0000 (8 15:07 +0100)
tree39c56f1ff741dce5c74c65ac5af499deaacd70e5
parent43fbab6973e5bacb98a78c7f92c9b29b321929ee
add support for (single) declarations

For every declaration, we record that the declared variable was declared
somewhere inside the scop and we introduce a kill statement at the location
of the declaration.  This allows users who perform dataflow analysis to
stop looking for sources before the declaration.
If the declaration appears inside a block, we also add a kill statement
at the end of the block.  This signals to the same users that
the value of the variable will not be used after the block.
Otherwise, we mark the variable as being exposed to the outside of the scop.

In autodetect mode, we skip declarations in the outer scope.
We do this to avoid autodetecting scops containing only declarations.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
emit.c
include/pet.h
parse.c
scan.cc
scan.h
scop.c
scop.h
tests/decl.c [new file with mode: 0644]
tests/decl.scop [new file with mode: 0644]
tests/forward_substitution3.c [new file with mode: 0644]
tests/forward_substitution3.scop [new file with mode: 0644]