Skip to content

Conversation

@burmako
Copy link

@burmako burmako commented Oct 2, 2019

No description provided.

natecook1000 and others added 30 commits April 25, 2019 10:39
I'm not sure this code ever worked, but this new version does. Also
includes some style revisions to the surrounding text.
Doing so prevented the coercion of a function with argument labels to a
user-written function type, as the latter cannot contain argument
labels. This commit changes the behaviour such that the referenced
function is considered to be unapplied, meaning it has its argument
labels stripped, therefore allowing the coercion.

Resolves SR-11429.
Added getAllLeafTypes to ProjectionTree.  The new method vends, via an
out paramter, a vector containing the types of all the leaves in a
projection tree in the order that they appear.  The method relies uses a
new convenience on ProjectionTreeNode, isLeaf to include only the types
of those nodes which are leaves.

Excerpted from @GottesM's #16756.
Added getUsers to ProjectionTree.  The new method vands, via an out
parameter, a set of all the users of all of the nodes in the projection
tree that are themselves not in the projection tree by way of
getNonProjUsers.  Took this opportunity to tweak getNonProjUsers to vend
a const ArrayRef rather than a SmallVector.

Excerpted from @GottesM's #16756.
…leases.

Added getPartiallyPostDomReleaseSet to
ConsumedArgToEpilogueReleaseMatcher.  Given an argument, the new method
returns the array of releases of the argument if there is an array
thereof and if the releases therein do not jointly post-dominate the
argument.

Excerpted from @GottesM's #16756.
Replaced some namespace qualified references to ArrayRef and Optional
with the unqualified type.  Reordered the includes per clang-format.

Excerpted from @GottesM's #16756.
Added brief doc for FunctionSignatureOpts' ArgumentDescriptor's method
canOptimizeLiveArg and tweaked the style to add braces around the body
of a single line if clause.
The command-line option for sil-fso-enable-generics was previously
visible outside the FunctionSignatureOpts translation unit.  It is not
any longer.
The new flag -sil-fso-optimize-if-not-called forced function signature
optimization to run even on functions which are not called.  Doing so is
helpful for tests to alleviate the burden of writing code to actually
call a function in whose function signature optimization we are
interested.
…ectory which use %target-sil-opt. This causes problems if some lit systems don't recognize %sil-opt and only recognize %target-sil-opt. Updating for consistency.
…nostic

Since we are about to start diagnosing more than just closures,
we need information about what synthesized arguments look like.
…dex of synthesized argument

In diagnostic mode allow argument matcher to synthesize new
arguments, which makes it much easier to diagnose problems
related to missing arguments.
Diagnose situation when parameter type expects N arguments
but argument has `M` where `M` < `N`, e.g.:

```swift
func foo(_: (Int) -> Void) {}
func bar() -> Void {}

foo(bar) // expected 1 argument, got 0
```
Function type has fewer arguments than expected by context:

```swift
func foo() {}
let _: (Int) -> Void = foo // expected 1 argument, got 0
```
… distinct arguments

Diagnose cases when instead of multiple distinct arguments
call got a single tuple argument with expected arity/types:

```swift
func foo(_: Int, _: Int) {}
foo((0, 1)) // expected 2 arguments, got 1 tuple with 2 elements
```
If call is missing a single argument we can provide a tailored
diagnostic and suggest a fix-it to add it at the appropriate
position.
… assign_by_wrapper.

Fixes a crash when a function, which assigns to a wrapped property has additional generic parameters.

https://bugs.swift.org/browse/SR-11484
rdar://problem/55442328
…pped value

Teach SILGen to emit a separate SIL function to capture the
initialization of the backing storage type for a wrapped property
based on the wrapped value. This eliminates manual code expansion at
every use site.
Use the newly-introduced property wrapper backing initializer function
in definite initialization (DI) to form the assign_by_wrapper
instruction, rather than forming a reference to the (only) property
wrapper's `init(wrappedValue:)`. This allows DI to work on properties
that have multiple, composed property wrappers applied to them.
…lted args

Generalize the type checking when searching for "wrappedValue"
initializers to also allow initializers that have other, defaulted
parameters as well.
mikeash and others added 13 commits September 30, 2019 11:00
…unning against a runtime that isn't part of the OS.

rdar://problem/55727341
…-nominal-assertion

Fail early if getExtendedNominal is called before extension has been bound.
…pointer

MetadataReader: Add an API for reading absolute pointers.
[ClangImporter] Don't transform NSObject<...> when there's no NSObject protocol
… SILInstruction variants.

The SILInstruction variant calls the SILValue version for each of its results.
[ClangImporter] In `shouldIgnoreMacro()` Use `Preprocessor::getSpellingOfSingleCharacterNumericConstant()` for determining if a macro is '1'
…b799b8f5c7ca02

[debug-utils] Split deleteAllDebugUses(ValueBase *) into SILValue and…
…0423ec9b63ac32

[apply-site] Refactor out a helper function called insertAfterApply -…
@burmako burmako added the tensorflow This is for "tensorflow" branch PRs. label Oct 2, 2019
@burmako
Copy link
Author

burmako commented Oct 2, 2019

@swift-ci please test tensorflow

@burmako
Copy link
Author

burmako commented Oct 2, 2019

@swift-ci please test tensorflow

1 similar comment
@burmako
Copy link
Author

burmako commented Oct 2, 2019

@swift-ci please test tensorflow

dan-zheng and others added 3 commits October 2, 2019 01:23
…27486)

#27238 tightened debug info requirements,
adding assertions to AllocStack and AllocBox constructors.

This requires differentiation transform changes:

- When cloning `alloc_stack` instructions that may have SILDebugVariable info,
  propagate the info.
  - This is relevant for `JVPEmitter::emitTangentForAllocStackInst`.

- When using AllocStack for "local allocations" that do not correspond to
  user-written VarDecls, use `RegularLocation::getAutoGeneratedLocation()` as
  the location so that assertions do not trigger.
  - This is relevant for `PullbackEmitter::getAdjointBuffer`.
@burmako
Copy link
Author

burmako commented Oct 2, 2019

@swift-ci please test tensorflow

@burmako
Copy link
Author

burmako commented Oct 2, 2019

@swift-ci please test tensorflow

@burmako
Copy link
Author

burmako commented Oct 2, 2019

@swift-ci please test tensorflow

1 similar comment
@burmako
Copy link
Author

burmako commented Oct 2, 2019

@swift-ci please test tensorflow

@burmako
Copy link
Author

burmako commented Oct 3, 2019

Due to some reason, CI refuses to run on macOS, but I can confirm that I ran tests successfully on my laptop.

@burmako burmako merged commit b8f31a1 into tensorflow Oct 3, 2019
@burmako burmako deleted the tensorflow-merge branch October 3, 2019 00:16
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.