support inlining of non-outermost call expressions
commit4cb06c8a344da9c5673bf043bf81f60e145743e3
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 2 Mar 2017 17:37:43 +0000 (2 18:37 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 9 Mar 2017 16:20:22 +0000 (9 17:20 +0100)
tree747be78f0d36d17487bcf63ed1fc95746e1a327a
parentcce3a3e5c251b295ddf4a327a2da75e29fa53731
support inlining of non-outermost call expressions

Commit 253cd82 (support inlining of outermost call expressions,
Tue Aug 11 14:10:38 2015 +0200) introduced support for inlining
outermost call expression.  Allow inlining outer call expressions
as well.

In particular, allow inlined functions to have a return statement
at the end and replace this return statement by a write to
a freshly created variable.  The calls in the original statement
and in arguments to outer inlined functions are replaced by reads
from these variables.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
13 files changed:
Makefile.am
inlined_calls.cc [new file with mode: 0644]
inlined_calls.h [new file with mode: 0644]
inliner.cc
inliner.h
scan.cc
scan.h
tests/inline12.c [new file with mode: 0644]
tests/inline12.scop [new file with mode: 0644]
tests/inline13.c [new file with mode: 0644]
tests/inline13.scop [new file with mode: 0644]
tests/inline14.c [new file with mode: 0644]
tests/inline14.scop [new file with mode: 0644]