Replace the use of -sil-inline-threshold with @inline(never) on specific
functions. This is required in some cases in order to remove the generic
specialization pass and allow the inliner to do the specialization
instead (specifically the cases where the parameter is 0, which causes
us to exit the inliner immediately).
Also add public in some places to ensure that we do not toss out
functions before we even make it to the inliner (once the standalone
generic specialization pass is removed).
Swift SVN r31126
This is needed for tests which define internal functions which should not be eliminated.
So far this was not needed because of a hack which prevented whole-module-optimizations for tests.
Swift SVN r22658
In most cases this means adding @public to things that get serialized;
in a few cases it means using a modern public stdlib API instead of
a legacy thing I was trying to keep @internal.
Swift SVN r19350
Entities with shared linkage are allowed to be discarded if they are unused even
in a library context.
Previously we implemented this in the serializer, which introduced
needless complications. Now we leave that responsibility to the optimizer giving
simplicity.
Swift SVN r16150