Commit Graph

6390 Commits

Author SHA1 Message Date
swift-ci
376c6e3f88 Merge remote-tracking branch 'origin/master' into master-next 2018-05-25 14:09:11 -07:00
Arnold Schwaighofer
042d837cc6 Merge pull request #16842 from aschwaighofer/irgen_use_clangs_datalayout
IRGen: Use clangs's LLVM datalayout
2018-05-25 13:55:24 -07:00
swift-ci
d4484b07b0 Merge remote-tracking branch 'origin/master' into master-next 2018-05-25 11:29:01 -07:00
Arnold Schwaighofer
81a15fbe19 IRGen: Use clangs's LLVM datalayout
It knows better ...

rdar://40275689
2018-05-25 11:19:01 -07:00
David Zarzycki
4abed135df [IRGen] Do not use ObjC tagged-pointer logic on non-ObjC platforms
Please note that some ObjC tests moved out of test/IRGen/enum.sil and
into test/IRGen/enum_objc.sil because `#if` does not work with SIL
keywords.
2018-05-25 08:59:40 -04:00
swift-ci
c1d5407fc0 Merge remote-tracking branch 'origin/master' into master-next 2018-05-24 15:29:05 -07:00
Huon Wilson
d1bdec8d76 Merge pull request #16808 from huonw/disable-emit-public-type-metadata-accessors
[IRGen] Make -emit-public-type-metadata-accessors a no-op.
2018-05-25 08:22:55 +10:00
Vedant Kumar
105a61e50d Use LLVM_DEBUG() instead of DEBUG()
Upstream has renamed the DEBUG() macro to LLVM_DEBUG. This updates swift
accordingly:

$ find . -name \*.cpp -print -exec sed -i "" -E "s/ DEBUG\(/ LLVM_DEBUG(/g" {} \;
2018-05-24 13:10:45 -07:00
swift-ci
76bd350b43 Merge remote-tracking branch 'origin/master' into master-next 2018-05-24 08:09:06 -07:00
Arnold Schwaighofer
c0af215fd8 Merge pull request #16802 from aschwaighofer/swift5_sections
Rename swift sections from swift4 to swift5
2018-05-24 07:52:15 -07:00
swift-ci
93eb7a2279 Merge remote-tracking branch 'origin/master' into master-next 2018-05-23 19:49:08 -07:00
Huon Wilson
ba150e9240 Merge pull request #16786 from huonw/tbdgen
More TBDGen: force-load, conformance witness details, test header clean-up, more purposeful handling of accessors.
2018-05-24 12:37:15 +10:00
Huon Wilson
60ae475ca0 [IRGen] Make -emit-public-type-metadata-accessors a no-op.
This work-around is no longer needed now that the full fix landed in
https://github.com/apple/swift/pull/16615. The argument is left with a warning
to help with migration between compilers with the work-around and compilers with
the full fix (see also rdar://problem/40502379).

Fixes rdar://problem/40476573.
2018-05-24 09:37:35 +10:00
swift-ci
469fb047c1 Merge remote-tracking branch 'origin/master' into master-next 2018-05-23 13:29:12 -07:00
Arnold Schwaighofer
cc7f207cec Rename swift sections from swift4 to swift5
rdar://38465220
2018-05-23 12:18:08 -07:00
Arnold Schwaighofer
98506e03cf IRGen: Opaque existentials are now bitwise takable
Now that the existential inline buffer is bitwise takable so are opaque
existentials.
2018-05-23 11:17:54 -07:00
Bob Wilson
4d5e275a77 Merge pull request #16795 from compnerd/dwo
IRGen: adjust for LLVM API change
2018-05-23 09:10:57 -07:00
swift-ci
94f870732f Merge remote-tracking branch 'origin/master' into master-next 2018-05-23 08:49:20 -07:00
Saleem Abdulrasool
ec4ec6b1f9 IRGen: adjust for LLVM API change
SVN r332881 introduced an additional parameter to emit a DWO file.
2018-05-23 08:48:42 -07:00
Huon Wilson
cfc5abdaa2 [TBDGen] Emit the symbol for autolink-force-load-ing.
Fixes rdar://problem/40356032.
2018-05-23 10:56:49 +10:00
Arnold Schwaighofer
6267860a7e IRGen: Remove initializeBufferWithTakeOfBuffer in favor of memcpy
And update the existential container's initializeWithTake implementation
in the runtime. After only allowing bitwise takable values in the
inline buffer we can use memcpy to move existential container values.

rdar://31414907
SR-343
2018-05-22 13:05:00 -07:00
swift-ci
7cdafa138d Merge remote-tracking branch 'origin/master' into master-next 2018-05-22 12:49:30 -07:00
Arnold Schwaighofer
1d8faf6b8b Fix comment 2018-05-21 14:52:07 -07:00
Arnold Schwaighofer
6da374eca6 Cleanup 2018-05-21 14:10:13 -07:00
Arnold Schwaighofer
298067496d ABI: Only store bitwise take-able values inline
SR-343
rdar://31414907
2018-05-21 14:02:12 -07:00
swift-ci
f80606acce Merge remote-tracking branch 'origin/master' into master-next 2018-05-19 17:29:42 -07:00
Slava Pestov
ebb1198d57 AST: There's no longer any reason to pass SubstitutionMap by const reference
SubstitutionMaps are now just a trivial pointer-sized value, so
pass them by value instead.

I did have to move a couple of functors from Type.h to SubstitutionMap.h
to resolve some issues with forward declarations.
2018-05-19 00:45:36 -07:00
swift-ci
bcbc59b346 Merge remote-tracking branch 'origin/master' into master-next 2018-05-17 18:29:35 -07:00
Adrian Prantl
c241ff305e Emit compiler-generated debug locations for outlined transparent functions.
In the majority of the use-cases transparent functions are inlined by
the mandatory inliner which by design drops all debug info and
pretends the inlined instructions were always part of the
caller. Since an outlined copy of the function is often still
generated, attaching debug locations to it is inconsistent and can
create the false impression that it were possible to set a breakpoint
in such a function when in reality these functions are only there for
very few edge cases.

<rdar://problem/40258813>
2018-05-17 16:38:04 -07:00
swift-ci
228d6d7674 Merge remote-tracking branch 'origin/master' into master-next 2018-05-17 07:49:03 -07:00
Arnold Schwaighofer
0be00c820e Merge pull request #16608 from aschwaighofer/unique_foreign_type_witnesses
Unique synthesized foreign type witnesses and make witness tables part of the metadata cache key
2018-05-17 07:35:10 -07:00
swift-ci
6f2b0080fc Merge remote-tracking branch 'origin/master' into master-next 2018-05-15 17:49:17 -07:00
swift-ci
818966cc36 Merge pull request #16645 from gottesmm/pr-8ac9b327ca84caac102d0afb3fd6f50912d3da03 2018-05-15 17:39:46 -07:00
Michael Gottesman
aa035e9563 Rename disable-llvm-arc-opts => disable-swift-specific-llvm-optzns and make sure that we actually disable /all/ LLVM passes.
For instance, we were always running merge functions unconditionally if -O was
passed.

rdar://40097698
2018-05-15 16:18:16 -07:00
swift-ci
2714ed70c6 Merge remote-tracking branch 'origin/master' into master-next 2018-05-15 14:09:30 -07:00
John McCall
2ed90771f4 Use the VWT for value ops on types with ABI-inaccessible children.
rdar://39763787
2018-05-15 15:07:32 -04:00
Adrian Prantl
6bbabd167f Adopt to upstream LLVM API change 2018-05-15 10:20:39 -07:00
swift-ci
3551bc5ae5 Merge remote-tracking branch 'origin/master' into master-next 2018-05-14 22:09:19 -07:00
Doug Gregor
233d29a2ac Merge pull request #16616 from DougGregor/emit-public-type-metadata-accessors
Add -emit-public-type-metadata-accessors to work around metadata linkage bug.
2018-05-14 21:55:01 -07:00
Doug Gregor
20832fd2c5 Add -emit-public-type-metadata-accessors to work around metadata linkage bug.
IRGen can introduce calls to type metadata accessors for types that
should not be visible to the current translate, which can manifest in
linker errors within a module (for references to private types when
whole module optimization is disabled) or across modules (for
references to private/internal types in another module). Introduce a
new compiler flag `-emit-public-type-metadata-accessors` that emits
all type metadata accessors with public linkage, to work around the
problem in affected projects. This flag is intended to go away once we
have a proper solution.

This bug has been around in Swift "forever", but compiling the
overlays using -enable-resilience has exacerbated the problem and
caused regressions. This is a short-term fix to
rdar://problem/40229755 while we work on the correct long-term fix.
2018-05-14 17:09:14 -07:00
swift-ci
14cddf5cd6 Merge remote-tracking branch 'origin/master' into master-next 2018-05-14 15:08:49 -07:00
Erik Eckstein
915391ee99 IRGen: don't emit metadata lazily in JIT mode.
We already do this for witness tables, but the check was missing for metadata.
This problem caused unresolved symbols when interpreting with -O.

rdar://problem/40128897
2018-05-14 14:07:19 -07:00
Arnold Schwaighofer
e78c840647 Witness table pointers shall now be part of the metadata cache key
rdar://24958043
2018-05-14 13:53:54 -07:00
Arnold Schwaighofer
b83941795a Unique synthesized foreign type conformances
- Add swift_getForeignWitnessTable to unique non-unique foreign type
   witness tables

 - IRGen: Call the foreign witness uniquing runtime function

rdar://24958043
2018-05-14 13:52:41 -07:00
swift-ci
65bf732c9b Merge remote-tracking branch 'origin/master' into master-next 2018-05-14 13:28:49 -07:00
Michael Gottesman
08fc956382 Make our LLVM level passes obey disable-llvm-optzns.
We weren't performing the right check here... I added a test that tests both
positive/negative cases.

rdar://40097698
2018-05-14 12:09:06 -07:00
swift-ci
23f5553589 Merge remote-tracking branch 'origin/master' into master-next 2018-05-11 23:09:52 -07:00
Doug Gregor
ef020c74aa Eliminate all vestiges of Substitution and SubstitutionList.
Introduced during the bring-up of the generics system in July, 2012,
Substitution (and SubstitutionList) has been completely superseded by
SubstitutionMap. R.I.P.
2018-05-11 21:43:40 -07:00
swift-ci
7b7c4d7469 Merge remote-tracking branch 'origin/master' into master-next 2018-05-11 21:10:05 -07:00
Doug Gregor
049c56dde6 Eliminate getForwardingSubstitutions().
Use the SubstitutionMap version everywhere.
2018-05-11 17:37:27 -07:00