Anton Korobeynikov
6e2c4faa34
[AutoDiff] Lookup for custom derivatives in non-primary source files ( #58965 )
...
* Lookup for custom derivatives in non-primary source files after typecheck is finished for the primary source.
This registers all custom derivatives before autodiff transformations and makes them available to them.
Fully resolves #55170
2022-07-18 11:52:02 -07:00
Pavel Yaskevich
86165291aa
[TypeChecker] Change the way for-in statement in type-checked
...
Instead of asking SILGen to build calls to `makeIterator` and
`$generator.next()`, let's synthesize and type-check them
together with the rest of for-in preamble. This greatly simplifies
interaction between Sema and SILGen for for-in statements.
2022-05-30 23:17:41 -07:00
Ben Barham
efc9469444
Merge pull request #58975 from bnbarham/make-features-consistent
...
[Tests] Make OS features consistent
2022-05-25 16:02:43 -07:00
Philip Turner
c74cbce95a
Fix incorrect derivative ( #41423 )
2022-05-24 23:32:04 -07:00
Ben Barham
c163e0fe5e
[Tests] Make OS features consistent
...
lit.py currently allows any substring of `target_triple` to be used as a
feature in REQUIRES/UNSUPPORTED/XFAIL. This results in various forms of
the OS spread across the tests and is also somewhat confusing since they
aren't actually listed in the available features.
Modify all OS-related features to use the `OS=` version that Swift adds
instead. We can later remove `config.target_triple` so that these don't
the non-OS versions don't work in the first place.
2022-05-20 19:51:23 -07:00
Anton Korobeynikov
4f05096594
Propagate location from destination alloca in salvageDebugInfo(). ( #58763 )
...
`salvageDebugInfo` is called during SIL Mem2Reg and could produce misleading debug info in the following case:
```
%a = alloc_stack $MyModel.TangentVector, var, name "self", argno 1, implicit, loc "debug2.swift":37:17 ...
...
store %b to %a : $*MyModel.TangentVector
```
Such SIL could be created as a result of inlining (where store comes from the inlined function).
Before this patch we'd end with `debug_value` instruction with variable information, but without or incorrect location.
This caused LLVM IR debug info verifier assertions when there might be another instruction with complete debug info (including location) for the same argument.
After this patch we always reuse it from destination alloca
Fixes #58660
2022-05-11 13:28:23 -07:00
Anton Korobeynikov
a1e138b2af
[AutoDiff] Implement cross-file lookup of derivatives ( #58644 )
...
Look-up for functions with @derivative attributes defined in non-primary source files
Fixes #55170
2022-05-11 08:18:51 -07:00
Slava Pestov
dac8d666ee
Stop passing -requirement-machine-{abstract,inferred,protocol}-signatures flags in tests
...
These flags are now no-ops.
2022-05-10 12:56:17 -04:00
Slava Pestov
f39372b33d
RequirementMachine: Turn off redundant requirement warnings by default and add -warn-redundant-requirements frontend flag
2022-05-10 01:49:56 -04:00
Slava Pestov
92a78c46ec
RequirementMachine: Update remaining tests for requirement machine diagnostics
...
A handful of cases where we emit a bogus redundancy warning are marked with
'FIXME(rqm-diagnostics)'.
2022-05-10 01:49:56 -04:00
Richard Wei
b42c2028b2
Merge pull request #58676 from rxwei/disable-autodiff-lba-tests-backdeployment
...
[AutoDiff] Disable LBA tests on `use_os_stdlib` or `back_deployment_runtime`
2022-05-05 09:23:38 -07:00
Richard Wei
f6f1abb53e
[AutoDiff] Disable LBA tests on use_os_stdlib or back_deployment_runtime
...
rdar://92757783
2022-05-04 16:21:58 -07:00
Joe Groff
55cda87dac
Merge pull request #58651 from jckarter/closure-literal-function-conversion-throws
...
SILGen: Emit a closure literal in a function conversion as the converted type.
2022-05-04 14:15:10 -07:00
Joe Groff
482cc8ae24
SILGen: Emit a closure literal in a function conversion as the converted type.
...
Closure literals are sometimes type-checked as one type then immediately converted to another
type in the AST. One particular case of this is when a closure body never throws, but the closure
is used as an argument to a function that takes a parameter that `throws`. Emitting this naively,
by emitting the closure as its original type, then converting to throws, can be expensive for
async closures, since that takes a reabstraction thunk. Even for non-async functions, we still want
to get the benefit of reabstraction optimization for the closure literal through the conversion too.
So if the function conversion just add `throws`, emit the closure as throwing, and pass down the
context abstraction pattern when emitting the closure as well.
2022-05-04 10:24:11 -07:00
Richard Wei
b9fed629bd
[AutoDiff] Disable tests on use_os_stdlib or back_deployment_runtime
...
AutoDiff is not ABI-stable and not shipped in any OS. We disable all AutoDiff runtime tests with `use_os_stdlib` or `back_deployment_runtime`.
2022-05-03 14:04:58 -07:00
Philip Turner
61a352486e
Create sr15884-generic-signature-builder-keypath-iterable.swift
2022-04-29 16:07:37 -04:00
Josh Soref
e8b5204bd0
Spelling autodiff ( #42546 )
...
* spelling: differentiated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: initialization
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: multiplication
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: occasionally
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: overriding
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* Rename test
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com >
2022-04-25 09:01:37 -07:00
Josh Soref
624a54b9cf
Spelling stdlib ( #42544 )
...
* spelling: abcdefghijklmnopqrstuvwxyz
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: clazz
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: collection
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: compressible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: constituent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: contiguous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: convertibility
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: element
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: enforce
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: exhaustive
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: exhausts
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: existential
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: facilitate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: ignored
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: incorporated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: intersection
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: laziness
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: misaligned
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: overhaul
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: preamble
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: precondition
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: replacement
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: trailing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unambiguous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: uncompressible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: world
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com >
2022-04-22 19:18:38 -07:00
Josh Soref
4721852fcb
Spelling parse ( #42469 )
...
* spelling: appear
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: availability
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: available
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: coerce
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: collection
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: condition
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: conditional
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: delimiter
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: derived
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: diagnostics
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: disambiguation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: dropped
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: escaped
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: existence
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: expression
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: expressions
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: extended
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: furthermore
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: identifier
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: indentation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: inspect
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: miscellaneous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: multiline
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: offset
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: passthrough
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: precede
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: prefix
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: receiver
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: reference
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: registered
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: representing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: returned
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: sequence
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: should
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: successfully
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: that
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: the
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: trivia
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unsupported
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: whitespace
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com >
2022-04-21 09:31:40 -07:00
Anton Korobeynikov
c4ebb3249f
Properly transfer location info from debug_value into alloc_stack: we need to drop op_deref expression ( #42245 )
...
In order to transfer debug info from `debug_value` to `alloc_stack` we need to drop `op_ref` debug expression, as the latter instruction represents the location and not the value itself. Also, fix the debug info verifier as variable type was deduced from `alloc_stack` / `alloc_box` improperly: pointer type of instruction itself was used instead of underlying object type.
The issue is only exposed when both optimizations (SIL mem2reg at least) and debug info are enabled
Resolves SR-15849
2022-04-21 08:03:21 -07:00
eeckstein
0cf20db0af
Merge pull request #42507 from tshortli/fix-misspelled-check-lines
...
Fix misspelled `CHECK` lines
2022-04-21 07:07:52 +02:00
Allan Shortlidge
dbbaf464a1
AutoDiff: Fix CHECK spelling
2022-04-20 16:36:01 -07:00
Josh Soref
4c77c59269
Spelling sema ( #42474 )
...
* spelling: accessibility
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: accessories
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: adjustments
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: all
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: ambiguous
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: arguments
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: assignment
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: associated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: assumes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: auxiliary
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: availability
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: available
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: belongs
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: checking
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: clazz
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: compatibility
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: completely
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: completion
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: complicated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: conformance
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: constrained
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: constraint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: contextual
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: conversion
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: convertible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: couldn't
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: declaration
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: defaultable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: dependent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: depending
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: describe
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: diagnostic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: diagnostics
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: existential
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: expects
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: explicit
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: explicitly
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: expression
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: first
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: font
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: forward
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: generation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: generic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: given
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: global
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: guarantee
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: happened
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: hierarchy
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: identical
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: immediately
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: implicit
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: indicates
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: inferred
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: initialization
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: initialize
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: initializer
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: integrity
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: interpolation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: introducing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: involved
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: just
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: like
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: likewise
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: mismatch
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: missing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: more
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: necessarily
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: noescape
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: nonetheless
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: occurrences
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: operators
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: optional
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: otherwise
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: outside
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: overload
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: overridden
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: override
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: parameter
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: parameters
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: penalize
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: platforms
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: precedence
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: preemptively
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: preliminary
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: preserve
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: propagate
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: propagated
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: qualifier
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: question
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: really
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: received
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: references
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: replaceable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: replacement
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: representable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: representative
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: requirement
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: requires
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: resolved
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: retrieve
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: rewriting
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: satisfied
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: semantics
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: signature
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: similar
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: simplest
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: simplification
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: solver
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: struct
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: structurally
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: success
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: sure
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: symmetric
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: syntactically
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: target
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: that
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: the
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: themselves
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: these
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: this
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: transform
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: transparent
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: tread
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: truncation
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: type
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unconstructable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: universally
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unknown
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: unwrapped
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: versioned
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: visible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
* spelling: where
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com >
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com >
2022-04-20 15:12:46 -07:00
Anton Korobeynikov
121e28051a
Force escaping all thin functions. Ensure types are always unique.
2022-04-20 10:34:45 +02:00
Saleem Abdulrasool
36c951d31e
Revert "[DebugInfo] Ignore noescape bit for all @convention(c) pointers"
2022-04-19 18:09:23 -07:00
Anton Korobeynikov
0258ed3209
Force escaping all thin functions. Ensure types are always unique.
2022-04-18 22:43:57 +02:00
Allan Shortlidge
1a600f4a79
Merge pull request #42351 from tshortli/adopt-interface-verification-in-more-tests
...
ModuleInterface: Enable interface verification in more tests
2022-04-18 09:12:03 -07:00
Anton Korobeynikov
d52dddc7c8
[AutoDiff] Fix adjoint propagation for active bb address arguments ( #42393 )
...
Fix adjoint propagation for active bb address arguments: ensure they are accumulated in the proper buffer.
Fixes second case of SR-16094
2022-04-16 14:12:25 -07:00
Allan Shortlidge
d3dbe75419
ModuleInterface: Introduce the %target-swift-emit-module-interface and %target-swift-typecheck-module-from-interface lit substitutions and adopt them in some tests that involve emitting a swiftinterface. The substitutions specify the additional flags -swift-version 5 -enable-library-evolution. There are a few motivations for adding these substitutions:
...
- Tests that depend on emitted interfaces should generally use flags that are typical for modules that have textual interfaces (e.g. `-enable-library-evolution`).
- If a test is intended to produce a valid `swiftinterface` then it should verify that interface. This will help prevent interface printing regressions caused by compiler changes.
- Having commonly used substitutions for tests that emit interfaces makes it easy to experiment with compiler flags that might effect interface printing.
Resolves rdar://91634358
2022-04-14 15:09:36 -07:00
Slava Pestov
b4b873332f
Update -requirement-machine-* flags in various tests
...
- Don't pass 'verify' since it's now the default
- Update tests where diagnostics changed in a correct way to pass 'on' instead
- Delete compiler_scale/explicit_requirements_perf.swift since it's not testing anything with the requirement machine
2022-03-31 15:57:36 -04:00
Anthony Latsis
ba7f301e83
ConformanceChecker: Always diagnose a conformance failure if the requirement check fails in 'ensureRequirementsAreSatisfied'
2022-03-28 23:22:36 +03:00
Erik Eckstein
6a020f8f15
Stabilize and simplify SIL linkage and serialization
...
The main point of this change is to make sure that a shared function always has a body: both, in the optimizer pipeline and in the swiftmodule file.
This is important because the compiler always needs to emit code for a shared function. Shared functions cannot be referenced from outside the module.
In several corner cases we missed to maintain this invariant which resulted in unresolved-symbol linker errors.
As side-effect of this change we can drop the shared_external SIL linkage and the IsSerializable flag, which simplifies the serialization and linkage concept.
2022-03-09 15:28:05 +01:00
Philip Turner
2af1460ce6
[AutoDiff] Introduce regression test for SR-15849 ( #41717 )
2022-03-08 13:13:00 -08:00
Holly Borla
12459cff80
[Diagnostics] Print 'any' in diagnostic arguments.
2022-03-05 14:26:45 -08:00
Slava Pestov
527f31ff64
AutoDiff: Another ugly hack to work around generics invariant violations
2022-03-02 17:42:40 -05:00
Anton Korobeynikov
4b7baf000c
[AutoDiff] Properly collect inout parameter adjoints ( #41559 )
...
Apparently, the parameter index calculation in #37861 was not always correct in presence of other pullback parameters (e.g. captures and non-differentiated args). Collect all inout parameters and collect inout parameter adjoints correctly.
Resolves SR-15891
2022-02-25 14:09:59 -08:00
Slava Pestov
1784aee148
Add '-requirement-machine-protocol-signatures=verify -requirement-machine-inferred-signatures=verify' to a few validation tests
2022-02-17 19:40:58 -05:00
Richard Wei
b0a038bd66
Merge pull request #41401 from asl/sr15205-fix
...
[AutoDiff] Fix several issues related to captured arguments
2022-02-16 16:45:10 -08:00
Richard Wei
7151608e21
Disable an autodiff test on Linux to unblock CI.
...
AutoDiff/compiler_crashers_fixed/rdar71191415-nested-differentiation-of-extension-method-optimized.swift is starting to fail recently. Tracked by rdar://89055298.
2022-02-16 16:34:10 -08:00
Anton Korobeynikov
91458b4890
Fix several issues related to captured arguments:
...
- Introduce a workaround while dealing with getLoweredParameterIndices() results:
it operates on AST and therefore does not take into account captured arguments
which are "on side" on AST and explicit in SIL
- Ensure captured arguments (@inout_aliased) are handled in a same way as ordinary
@inout arguments while generating a pullback type
Fixes SR-15205
2022-02-17 00:04:12 +03:00
Richard Wei
06b20662b8
[AutoDiff] Conform Array's and Optional's TangentVector to CustomReflectable
...
Resolves rdar://88542240.
2022-02-15 02:59:46 -08:00
Philip Turner
4b8ba3c1ce
Don't Unnecessarily Invalidate Unreferenced Generic Parameters ( #41128 )
2022-02-03 09:20:31 -08:00
Philip Turner
09ece3bbcf
[AutoDiff] Allow tgmath differentiation of Double ( #40991 )
...
This allows automatic differentiation of concrete calls to math functions operating on `Double`. Such calls were not differentiable because the concrete math functions were imported from C, not the generic ones defined in Swift. The fix is to define derivatives for these C functions. `test/AutoDiff/stdlib/tgmath_derivatives.swift.gyb` was modified to test the new functions.
2022-01-24 21:31:09 -08:00
eeckstein
2e4a010bcd
Merge pull request #40721 from eeckstein/cmo-by-default
...
Do conservative cross-module-optimization by default
2022-01-12 19:18:07 +01:00
Richard Wei
ce2fe0374e
Merge pull request #40813 from rxwei/rid-of-requirement-machine-flag
2022-01-12 07:36:59 -08:00
Erik Eckstein
6ee19f0bea
Do conservative cross-module-optimization by default
...
The "regular" CMO is done with the option `-cross-module-optimization`. It's good for performance but can increase code size.
Now, which this change CMO is also done if the option is not given, but in a very conservative way. Only very small functions are serialized and not additional type metadata is kept alive.
rdar://70082202
2022-01-12 12:43:53 +01:00
Richard Wei
a1cb9bbcc9
[AutoDiff] Move differentiable curry thunk bug reproducer to an XFAIL test.
...
Due to rdar://87429620, test/AutoDiff/SILOptimizer/differentiation_diagnostics.swift is still using `-requirement-machine=off`. This patch moves the reproducer to a standalone XFAIL test, and removes `-requirement-machine=off` from differentiation_diagnostics.swift.
2022-01-11 18:01:43 -08:00
Louis D'hauwe
a89ea380a9
[ASTPrinter] Print expressions
...
Add new `-print-ast-decl` frontend option for only printing declarations,
to match existing behavior.
Some tests want to print the AST, but don't care about expressions.
The existing `-print-ast` option now prints function bodies and expressions.
Not all expressions are printed yet, but most common ones are.
2022-01-11 14:24:16 -08:00
Robert Widmann
3511314952
Disable Flaky Test
...
Disable an autodiff test that's causing the linker on Ubuntu 20.04 to crash every so often
rdar://87254800
2022-01-07 09:08:07 -08:00
Robert Widmann
e5885871e0
Disable Flaky Compiler Crasher Test
...
This test appears to cause the linker to crash every so often.
rdar://86041709
2022-01-05 13:31:32 -08:00