Commit Graph

2340 Commits

Author SHA1 Message Date
Robert Widmann 52ddcea0d2 Diagnose Building SwiftONoneSupport with -experimental-skip-function-bodies
This allows us to push the validation and, importantly, the mutation of this flag into the compiler invocation where it belongs.
2020-05-13 09:13:44 -07:00
Robert Widmann eac92e3df0 [NFC] Const-Qualify LangOptions Accesses Through ASTContext 2020-05-13 09:13:44 -07:00
swift_jenkins b89b233b2e Merge remote-tracking branch 'origin/master' into master-next 2020-05-07 14:19:21 -07:00
Hamish Knight 72bb47ee90 [Frontend] Remove InputFileKind::SwiftREPL 2020-05-07 11:00:02 -07:00
swift_jenkins 8069dd1be9 Merge remote-tracking branch 'origin/master' into master-next 2020-05-07 08:20:47 -07:00
Slava Pestov b81c0d63d1 AST: Remove SourceFileKind::REPL 2020-05-07 02:04:05 -04:00
swift_jenkins 2af7cfcffe Merge remote-tracking branch 'origin/master' into master-next 2020-05-05 16:18:50 -07:00
Robert Widmann b06211eac4 Initial plumbing for private dependencies
Add a mode bit to the dependency collector that respects the frontend flag in the previous commit.

Notably, we now write over the dependency files at the end of the compiler pipeline when this flag is on so that dependency from SILGen and IRGen are properly written to disk.
2020-05-05 13:48:25 -07:00
swift_jenkins 4dc2e3c785 Merge remote-tracking branch 'origin/master' into master-next 2020-04-29 17:59:15 -07:00
Slava Pestov 368d47429d Frontend: Remove coarse-grained dependency graph implementation 2020-04-29 16:55:53 -04:00
swift_jenkins 9a852c7116 Merge remote-tracking branch 'origin/master' into master-next 2020-04-28 19:58:43 -07:00
Hamish Knight b78f47490a Move AST transforms out of the Frontend
Move the playground and debugger transforms out
of the Frontend and into `performTypeChecking`, as
we'd want them to be applied if
`performTypeChecking` was called lazily.
2020-04-28 14:44:17 -07:00
swift_jenkins 1b8e500e16 Merge remote-tracking branch 'origin/master' into master-next 2020-04-22 15:57:30 -07:00
Robert Widmann 78e07c1d41 Merge pull request #31159 from CodaFi/track-star
Remove Fallback Infrastructure For Evaluator-Based Dependencies
2020-04-22 15:37:48 -07:00
swift_jenkins 537100831f Merge remote-tracking branch 'origin/master' into master-next 2020-04-20 12:57:17 -07:00
Doug Gregor c59abcd543 Merge pull request #31154 from DougGregor/restrict-simulator-inference
[Darwin] Restrict inference of the simulator environment
2020-04-20 12:54:37 -07:00
Robert Widmann 5b22910830 Remove Fallback Infrastructure For Evaluator-Based Dependencies 2020-04-20 10:36:29 -07:00
Doug Gregor b63e9a6bcf [Frontend] Infer simulator environment in the frontend, too.
Some code paths that see target triples go through the frontend
without seeing the driver. Therefore, perform the same "simulator"
inference for x86 iOS/tvOS/watchOS triples also in the frontend,
to ensure that we remain compatible. Also make sure that
-print-target-info performs the appropriate adjustment.
2020-04-20 08:50:35 -07:00
swift_jenkins e44d529e6b Merge remote-tracking branch 'origin/master' into master-next 2020-04-20 08:37:18 -07:00
Artem Chikin c11f013101 Merge pull request #31099 from artemcm/NoWarningsAsErrorsOption
Add compiler option to *disable* warnings-as-errors
2020-04-20 08:35:53 -07:00
swift_jenkins c2672fe6e9 Merge remote-tracking branch 'origin/master' into master-next 2020-04-19 23:58:17 -07:00
Robert Widmann 37f016b802 [NFC] Formalize isModuleExternallyConsumed
Yank this parameter and document the historical scope creep of this value.
2020-04-19 21:46:59 -07:00
swift_jenkins 9458dc803c Merge remote-tracking branch 'origin/master' into master-next 2020-04-19 18:18:29 -07:00
Saleem Abdulrasool fbbf61f297 Revert "[Darwin] Further restrict inference of the simulator environment" 2020-04-19 16:43:22 -07:00
swift_jenkins 1acb641f2c Merge remote-tracking branch 'origin/master' into master-next 2020-04-17 21:17:31 -07:00
Doug Gregor 22cdddd84e Merge pull request #30771 from DougGregor/stop-inferring-simulator
[Darwin] Further restrict inference of the simulator environment
2020-04-17 20:59:39 -07:00
swift_jenkins 1df751a7db Merge remote-tracking branch 'origin/master' into master-next 2020-04-17 15:17:29 -07:00
Joe Groff 948372b87c Merge pull request #31087 from jckarter/compatibility-51
Start a Compatibility51 library for backporting fixes to Swift 5.1 runtimes
2020-04-17 15:06:50 -07:00
Artem Chikin c3b0232c2c Add compiler option to *disable* warnings-as-errors
`-no-warnings-as-errors`

This functionality is required for build systems to be able to overload/disable a given Swift project's preference of treating warnings as errors.

Resolves rdar://problem/35699776
2020-04-17 12:10:26 -07:00
Joe Groff 42514f42e0 Start a Compatibility51 library for backporting fixes to Swift 5.1 runtimes 2020-04-17 10:41:48 -07:00
Doug Gregor 8339f32184 [Frontend] Infer simulator environment in the frontend, too.
Some code paths that see target triples go through the frontend
without seeing the driver. Therefore, perform the same "simulator"
inference for x86 iOS/tvOS/watchOS triples also in the frontend,
to ensure that we remain compatible. Also make sure that
-print-target-info performs the appropriate adjustment.
2020-04-16 21:42:43 -07:00
swift_jenkins e59efb4415 Merge remote-tracking branch 'origin/master' into master-next 2020-04-16 11:17:36 -07:00
Doug Gregor 290e9edaf8 [Driver/Frontend] Add target variant SDK version for Catalyst. 2020-04-15 22:11:11 -07:00
Doug Gregor 548e28170a [Driver/Frontend] Thread the target SDK version through to the IR.
Teach the driver to pass the SDK version it computes (from the SDK
settings JSON in a Darwin-based platform's SDK) down into the frontend.
The frontend then sets that SDK version in the LLVM module, which
eventually makes its way into the Mach-O file.

Last part of rdar://problem/60332732.
2020-04-15 21:42:28 -07:00
swift_jenkins 1ff7e55ac9 Merge remote-tracking branch 'origin/master' into master-next 2020-04-10 21:59:39 -07:00
Erik Eckstein 6da902ef8b Add an option to completely disable SIL verification.
This is useful to disable SIL verification in an assert build of the compiler.
2020-04-10 20:10:24 +02:00
swift_jenkins 14b2e0a2bd Merge remote-tracking branch 'origin/master' into master-next 2020-04-08 11:40:06 -07:00
Dan Zheng 2eb460de4d [AutoDiff upstream] Add forward-mode differentiation. (#30878)
JVP functions are forward-mode derivative functions. They take original
arguments and return original results and a differential function. Differential
functions take derivatives wrt arguments and return derivatives wrt results.

`JVPEmitter` is a cloner that emits JVP and differential functions at the same
time. In JVP functions, function applications are replaced with JVP function
applications. In differential functions, function applications are replaced
with differential function applications.

In JVP functions, each basic block takes a differential struct containing callee
differentials. These structs are consumed by differential functions.
2020-04-08 11:29:21 -07:00
swift_jenkins c1468d9eb2 Merge remote-tracking branch 'origin/master' into master-next 2020-04-07 19:21:15 -07:00
Artem Chikin 0d1013245e Merge pull request #30782 from artemcm/Rcross-import
Add -Rcross-import option
2020-04-07 19:04:47 -07:00
Artem Chikin b679fd8738 Add -Rcross-import option
It is an optional, user-accessible mechanism to have the compiler tell you what it’s cross-importing.

Resolves rdar://problem/60381893
2020-04-02 19:45:39 -07:00
swift_jenkins 9d645c3782 Merge remote-tracking branch 'origin/master' into master-next 2020-04-02 03:42:02 -07:00
Dan Zheng 1308fc69c5 [AutoDiff] Simplify conditions enabling differentiable programming. (#30765)
Previously, two conditions were necessary to enable differentiable programming:
- Using the `-enable-experimental-differentiable-programming` frontend flag.
- Importing the `_Differentiation` module.

Importing the `_Differentiation` module is the true condition because it
contains the required compiler-known `Differentiable` protocol. The frontend
flag is redundant and cumbersome.

Now, the frontend flag is removed.
Importing `_Differentiation` is the only condition.
2020-04-02 03:24:03 -07:00
swift_jenkins 37ac3a7aba Merge remote-tracking branch 'origin/master' into master-next 2020-04-01 10:20:19 -07:00
Arnold Schwaighofer 1bde486a63 IRGen: Disable type layout based value witness generation at Onone
Type layout based witness generation can emit quite complex IR that will
lead to code bloat if the llvm optimizer is not run.

No need to use type layouts at Onone.

rdar://61155295
2020-04-01 07:18:23 -07:00
swift_jenkins 12a5da6dc6 Merge remote-tracking branch 'origin/master' into master-next 2020-03-31 18:24:02 -07:00
Robert Widmann a337b67f69 Stage In Flags To Fall Back To Manual Tracking
Request-based incremental dependencies are enabled by default. For the time being, add a flag that will turn them off and switch back to manual dependency tracking.
2020-03-31 16:16:53 -07:00
swift_jenkins acbf5bf9ae Merge remote-tracking branch 'origin/master' into master-next 2020-03-27 15:42:21 -07:00
Owen Voorhees 791312fb74 Turn Educational Notes On-By-Default (#30583)
* [Diagnostics] Turn educational notes on-by-default

* [Diagnostics] Only include educational notes in printed output if -print-educational-notes is passed

* Make -print-educational-notes a driver option

* [Diagnostics] Issue a printed remark if educational notes are available, but disabled

* [docs] Update educational notes documentation and add a contributing guide

* [Diagnostics] Cleanup PrintingDiagnosticConsumer handling of edu notes

* Revert "[Diagnostics] Issue a printed remark if educational notes are available, but disabled"
For now, don't notify users if edu notes are available but disabled. This decision can be reevaluated later.
2020-03-27 15:29:48 -07:00
swift_jenkins 68e5c887fb Merge remote-tracking branch 'origin/master' into master-next 2020-03-25 10:45:22 -07:00