Commit Graph

14 Commits

Author SHA1 Message Date
Slava Pestov
6798eea160 Evolution: Some of these tests pass with swift_test_mode_optimize_none_with_implicit_dynamic
The remaining failures still warrant investigation.
2019-06-11 00:54:32 -07:00
Arnold Schwaighofer
e113ef8c93 Add a mode to test implicit dynamic with private imports 2019-03-20 14:34:01 -07:00
Slava Pestov
c28ade7077 Driver: Pass the new -sil-merge-partial-modules flag
Also pass flags to disable SIL optimization passes when merging
modules, since that's completely unnecessary.

An evolution test that used to fail with WMO disabled now passes
with this change.

FIxes <rdar://problem/18913977>.
2017-09-18 21:18:07 -07:00
Slava Pestov
94be90bea3 Revert "Driver: Pass the new -sil-merge-partial-modules flag"
This reverts commit 86d241b38e.
2017-09-15 18:37:54 -07:00
Slava Pestov
86d241b38e Driver: Pass the new -sil-merge-partial-modules flag
Also pass flags to disable SIL optimization passes when merging
modules, since that's completely unnecessary.

An evolution test that used to fail with WMO disabled now passes
with this change.

FIxes <rdar://problem/18913977>.
2017-09-15 00:24:52 -07:00
Slava Pestov
7ea93d9ed0 Revert "Preserve SIL when merging modules" 2017-09-14 19:04:18 -07:00
Slava Pestov
ef583499a9 Driver: Pass the new -sil-merge-partial-modules flag
Also pass flags to disable SIL optimization passes when merging
modules, since that's completely unnecessary.

An evolution test that used to fail with WMO disabled now passes
with this change.

FIxes <rdar://problem/18913977>.
2017-09-14 15:54:06 -07:00
Slava Pestov
49c54870c1 Serialization: Auto-linking recursively walks modules imported from -sil-serialize-all modules 2016-04-01 12:21:36 -07:00
Slava Pestov
37c461cc59 Serialization: Serialize shared thunks referenced from fragile functions
If a thunk is referenced from two different functions, the thunk inherits
the fragile attribute from the first function that forced it to be emitted.

This is wrong, in case the first function might not be fragile, while
the second one is. Copying the fragile attribute to an existing thunk when
checking if it has already been emitted is also wrong, because the thunk
might reference another thunk, and so on.

The correct fix is to have SIL serialization serialize the transitive
closure of all fragile functions and thunks referenced from fragile
functions. Re-work SIL function serialization to use a worklist so that
we can do this.

Part of https://bugs.swift.org/browse/SR-267.
2016-03-24 00:50:40 -07:00
Slava Pestov
3e2d7d40e0 SIL: Serialize bodies of local functions inside @_transparent functions
A transparent function might be deserialized and inlined into a function
in another module, which would cause problems if the function referenced
local functions.

Previously we would force local functions to have public linkage instead,
which worked, but was not resilient if the body of the transparent
function changed in the module that contained it.

Add a library evolution test ensuring that such a change is resilient
now.

Part of https://bugs.swift.org/browse/SR-267.
2016-03-24 00:50:39 -07:00
Luke Larson
f53db0ebd3 [rth] Add resilience test helper utility 2016-02-16 18:52:34 -08:00
Dmitri Gribenko
7e9b8fe325 Fix Evolution tests in the mode when StdlibUnittest is built with -sil-serialize-all 2016-02-13 18:37:27 -08:00
Dmitri Gribenko
0646b00498 Mark Evolution tests as executable 2016-02-04 17:17:41 -08:00
Slava Pestov
59a2e2aff8 Library evolution tests: add test for changing body of a transparent function
I'm going to add some more tests related to @_transparent shortly,
and it is important to verify that bodies of @_transparent functions
are serialized (at least in single-frontend mode, for now).

I realize this test is probably too specific, since in the future
we may sometimes choose not to inline @_transparent functions into
their callers, even if a serialized body is available; but this
will suffice for now.
2016-01-22 16:44:33 -08:00