Skip to content

Merge swift-DEVELOPMENT-SNAPSHOT-2019-10-13-a into tensorflow #27821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 184 commits into from
Oct 25, 2019

Conversation

saeta
Copy link
Contributor

@saeta saeta commented Oct 21, 2019

Merging!

adrian-prantl and others added 30 commits September 27, 2019 13:41
…space/time

efficient than -g on that platform. This improves time spent to link products
built with debug info quite a bit.
This gives us a one-stop shop for making changes to the override mechanism.

rdar://problem/54752086
Vtable thunks were incorrectly not marked as thunks, which means (among
other things) they're a false positive in the
NonInlinableFunctionSkippingChecker.
`AutoDiffIndexSubset` is a fixed-size bit vector that is used for efficiently representing a subset of indices in automatic differentiation, specifically for representing a subset of parameters and results of a function to differentiate with respect to. It is uniqued in `ASTContext`.

This patch adds definition and unit tests for `AutoDiffIndexSubset` along with new files `AutoDiff.h` and `AutoDiff.cpp` into the 'AST' target, with no changes to the compiler's behavior. More data structures used for AutoDiff will be added to these files.

----------------------------

This is part of the ongoing effort to merge the experimental [differentiable programming feature](https://forums.swift.org/t/differentiable-programming-mega-proposal/28547) (informally referred to as "AutoDiff") to the 'master' branch for code reviews and better maintenance.

Upstreaming task: [TF-879](https://bugs.swift.org/browse/TF-879)
lit runs its tests with only the environment variables set up by its configuration, which is great for repeatability, but sometimes you want to allow a few controlled leaks. With this change, you can now specify “--param copy_env=FOO:BAR:BAZ” to cause the environment variables FOO, BAR, and BAZ to be visible in lit tests during that run.
Now that llvm::iterator_range has 'empty', there's not enough reason to
keep our own version of it in the Swift repo.

No functionality change.
If we're going to get rid of swift::IteratorRange, let's make
llvm::iterator_range easy to use.

No functionality change.
When an EnumElementDecl is parsed, we create the parameter list before
creating the EnumElementDecl itself, so we have to re-parent those
ParamDecls just like we do for functions and subscripts.
…parameters

Currently single parameter tuple splat fix/diagnostic supports only
cases where parameter is a concrete tuple type, let's enhance that to
support generic parameters as well e.g.:

```swift
func foo<T>(_: T) {}
foo(0, 1, 2) // `T` expects arguments to form a tuple e.g. `foo((0, 1, 2))`
```
In situations like this:

```swift
func foo(x: (Int, Int) {}
foo(x: 0, 0)
```

Left paren to form a missing tuple should be placed after
the label because belongs to the parameter and not the tuple.
Correctly set the parent DeclContext of ParamDecls in EnumElementDecls
Optimize for libSyntax parsing.
The new 'parseListSyntax()' receives a vector storage, passes element
builder to the callback for populating the elements, then automatically
parses trailing commas. Also, it performs automatic recovery if the
element has an error (e.g. Skip until ',' or ')').
(Implemented by Nathan Hawes @nathawes)
(implemented by Nathan Hawes @nathawes)

Advance \p Loc to the last non-missing token of the specified or, if it
doesn't contain any, the last non-missing token preceding it in the
tree.
For non-migrated expression / decl attributes. Clean-up the slot after
the use. Assert there's no existing element at the location.
In AST token range, string literal token must be treated as a single
token.
[SILGen] Add the IsThunk bit to vtable thunks
…neric parameter

Since it's hard to say whether tuple use is really intended, let's
add `did you mean to pass a tuple?` note to the error message.
beccadax and others added 21 commits October 11, 2019 19:23
[PropertyWrappers] Look for constructors with default args when finding default init
[tests] Add mechanism to override lit environment
…ps-6

Circular validation cleanups, part 6
Be more accepting of vendor patterns.  Any name can be added by
configuration, so loosen the test.
…kup.

Swift 5.1's lookup for custom attributes skipped associated type
members, which allowed code like the given example to compile. To
maintain source compatibility, identify the narrow case that happens
in practice---the property wrapper is at module scope but is now
shadowed by an associated type---warn about it, and accept it.

Fixes rdar://problem/56213175.
DebugInfo: loosen producer pattern
…urce-compat

[Property wrappers] Fix source compatibility issue with attribute lookup
Remove time references, they do not add to the instructions.
…erge2

Tag build swift-DEVELOPMENT-SNAPSHOT-2019-10-13-a

Simple merge including conflicts.

Conflicts:
	include/swift/AST/ASTContext.h
	include/swift/AST/IndexSubset.h
	include/swift/Parse/Parser.h
	lib/AST/ASTContext.cpp
	lib/AST/CMakeLists.txt
	lib/AST/IndexSubset.cpp
	lib/Sema/TypeCheckDecl.cpp
	unittests/AST/CMakeLists.txt
	unittests/AST/IndexSubsetTests.cpp
Note: this was done as a distinct commit in order to make it easier to see what's actually going on.
@saeta saeta requested review from marcrasi and dan-zheng October 21, 2019 22:27
@@ -469,30 +469,30 @@
"tensorflow": {
"aliases": ["tensorflow"],
"repos": {
"llvm": "swift-DEVELOPMENT-SNAPSHOT-2019-10-08-a",
"llvm": "swift-DEVELOPMENT-SNAPSHOT-2019-10-13-a",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that commit hashes for clang for lldb have not updated - I wonder if that is intentional (perhaps there was nothing new to merge)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch @dan-zheng ! I tried to update them, but those repos are frozen due to the monorepo transition. So I'm going to leave them frozen for now. Does that sound okay?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the toolchain builds and passes tests without updating those repos, then we got lucky and that seems fine to me.

If we realize that we do need updates in those repos, options are:

  • Merge past the monorepo transition, transition ourselves to the monorepo, and make the updates in the monorepo.
  • Temporarily upload the updates to personal forks of the repos and point update-checkout-config there. After we transition to the monorepo, this temporary hack disappears.

@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Oct 24, 2019
@saeta
Copy link
Contributor Author

saeta commented Oct 25, 2019

@swift-ci please test tensorflow

2 similar comments
@saeta
Copy link
Contributor Author

saeta commented Oct 25, 2019

@swift-ci please test tensorflow

@pschuh
Copy link
Contributor

pschuh commented Oct 25, 2019

@swift-ci please test tensorflow

@pschuh pschuh merged commit 1862c95 into tensorflow Oct 25, 2019
@dan-zheng dan-zheng deleted the tensorflow-merge2 branch November 1, 2019 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tensorflow This is for "tensorflow" branch PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.