Commit Graph

2 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
b17788f862 [test] Use -emit-sorted-sil and reorder CHECKs to match output.
In some cases (Android ARMv7) the SIL output wasn't following the output
of the source code, and the test failed. Use -emit-sorted-sil to use a
stable sorting for the SIL, and reorder the source to match the SIL
output.

The output is now the same order not depending on the value of
StripOwnershipAfterSerialization.
2019-11-18 15:15:39 -08:00
Harlan Haskins
b904133c42 [Modules] Add flag to skip non-inlinable function bodies
This flag, currently staged in as `-experimental-skip-non-inlinable-function-bodies`, will cause the typechecker to skip typechecking bodies of functions that will not be serialized in the resulting `.swiftmodule`. This patch also includes a SIL verifier that ensures that we don’t accidentally include a body that we should have skipped.

There is still some work left to make sure the emitted .swiftmodule is exactly the same as what’s emitted without the flag, which is what’s causing the benchmark noise above. I’ll be committing follow-up patches to address those, but for now I’m going to land the implementation behind a flag.
2019-09-26 10:40:11 -07:00