We had three copies of this code, each of which did a bit more work than
was actually necessary. Consolidate them and avoid calling
`collectLinkLibraries()` on a given module more than once within this
path.
Ensure collocation by recording the dependence between witness table and
witness before functions are processed. Debug info of inlined function
scopes can reference the witness and will cause the wrong IRGenModule to
be associated before lazy witness tables are processed.
No, I am not sure that this is the only instance of this but the same
solution can apply to other instances if we find them.
rdar://39116991
Since Mirrors are using swift_getFieldAt we need built-in type
metadata present in JIT/REPL mode as well, otherwise some of the
types are going to become unprintable.
Xi edited this file to resolve a conflict (87d57fdc51) and his editor was
set to automatically remove all trailing whitespace. This divergence from
master is causing more conflicts, so I'm removing these unexpected
whitespace differences.
Instead of using the target that was passed to the driver. Use the target from
the clang importer that might have been changed by clang (i.e armv7 to thumbv7
on darwin)
rdar://32599805
Introduce a new section that contains (relative) references to all of the
Swift protocol descriptors emitted into this module. We'll use this to
find protocol descriptors by name.
This commit is mostly refactoring.
*) Introduce a new OptimizationMode enum and use that in SILOptions and IRGenOptions
*) Allow the optimization mode also be specified for specific SILFunctions. This is not used in this commit yet and thus still a NFC.
Also, fixes a minor bug: we didn’t run mandatory IRGen passes for functions with @_semantics("optimize.sil.never")
The large code model is not necessary. Large Address Aware should be
sufficient for dealing with the higher address ranges. Using the large
code model breaks the DLL storage semantics on Windows. With this we
are able to build most of the standard library for all variants of
Windows.
Addresses SR-6150!
Previously, we were just running ObjCARCContract when codegening. This is out of
character with the rest of the LLVM passes in Swift, namely that after these
have run, an IR pass no longer contains any compiler intrinsics. This can be
seen by SwiftARCContract running in the -O pipeline.
This commit harmonizes the behavior here.
For testing purposes, I added a flag that disables the running of
ObjCARCContract for testing purposes.
rdar://34824507
Interpreter support for thumb is not yet properly implemented/tested.
Disable thumb emission.
This change is necessary because LLVM now uses the features string in the
metadata. This features string contains '+thumb'.
This is a follow-up to 034241e440.
rdar://32599805
rdar://34781037 (tests that expect non-thumb instructions are failing)