Commit Graph

7 Commits

Author SHA1 Message Date
Stephen Lin
4b6e14ba5d Clone DebugScope to new instruction when inlining, for Adrian (who will write tests for this)
Swift SVN r8614
2013-09-24 23:56:52 +00:00
Anna Zaks
e7e3c10fec [SIL] Add appropriate SILLocations to the inlined code.
The inlined locations should point to the call site.

Swift SVN r8108
2013-09-11 20:54:31 +00:00
Stephen Lin
62ad1cca30 Take out the hack in SILInliner that is no longer necessary now that [auto_closure] is handled specially in SILGen, and allow MandatoryInlining to see through basic indirection through alloc box instructions in order to inline calls to [auto_closure] arguments. Note that the logic here is conservative; any second store (beyond the initial store in the prologue) or any capture of the alloc box will preventing inlining.
Swift SVN r7912
2013-09-04 21:45:19 +00:00
Stephen Lin
75099b7435 Narrow the rule that ApplyInsts in transparently inlined functions get the [transparent] flag to only apply to ApplyInsts that directly call function arguments, which is enough to handle the intended use case of [auto_closure] arguments to [transparent] functions without virally enforcing inlining more than we want to (or should be, once the phase ordering and incomplete SSA-ification issues are resolved).
Swift SVN r7774
2013-08-30 01:38:00 +00:00
Stephen Lin
3828b616d8 Make transparent inlining apply transparency recursively to all calls and also see through applications of partial applications (in SSA form); this is intended to ensure that [auto_closure] arguments of [transparent] functions get inlined, although that's additionally blocked by (apparent?) incompleteness of SSA-ification passes currently and phase ordering issues.
After implementing this I realized that a lot of the logic currently in MandatoryInlining.cpp should be moved into the SILInliner so it can be reused in an optimizing inliner. I plan on doing that refactoring immediately but decided to go ahead and commit this since it's a working incremental step.

Swift SVN r7771
2013-08-30 00:25:24 +00:00
Anna Zaks
be6feaa82c [SIL] Fixup commit r7248.
I forgot to add in the new files!

Swift SVN r7251
2013-08-15 01:21:57 +00:00
Stephen Lin
8d90466523 Reorganize SIL source tree: move lib/SIL/SILGen -> lib/SILGen, move lib/SIL/Passes -> lib/SILPasses, add lib/SILPasses/Utils
Swift SVN r7246
2013-08-14 23:47:29 +00:00