Skip to content
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

[pull] master from apple:master #25

Merged
merged 17 commits into from
Jun 16, 2020
Merged

[pull] master from apple:master #25

merged 17 commits into from
Jun 16, 2020

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 16, 2020

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

xedin and others added 17 commits June 15, 2020 13:55
As part of the code completion redesign this new entry point is going
to replace use of:

- `typeCheckExpression`
- `getTypeOfExpressionWithoutApplying` (which could be removed)

and possibly other methods currently used to retrieve information
for code completion purposes.

Advantages of a new approach:

- Avoids mutating AST;
- Allows to avoid sub-expression type-checking;
- Allows code completion access to multiple solutions in ambiguous cases;
- Provides all possible solutions - valid and invalid (with holes);
- Allows code completion to easily access not only types but
  overload choices and other supplimentary information associated
  with each solution.
The Swift driver (swift/swiftc) is supposed to always be used with an
accompanying SDK, which it derives from the environment. Our test
infrastructure was clearing out this SDK, making it deviate from the
normal operating environment unnecessarily. Switch to providing the
SDK used for building the standard library, which provides a
more-consistent test environment, and tag the few places in tests
where we have explicit dependencies on "no SDK."
Fixes the failure in AutoDiff/validation-test/forward_mode.swift on
arm64e.

rdar://64192250
…ove from Diagnostic pipeline -> Onone pipeline.

The pass is already not being run during normal compilation scenarios today
since it bails on OSSA except in certain bit-rot situations where a test wasn't
updated and so was inadvertently invoking the pass. I discovered these while
originally just trying to eliminate the pass from the diagnostic pipeline. The
reason why I am doing this in one larger change is that I found there were a
bunch of sil tests inadvertently relying on guaranteed arc opts to eliminate
copy traffic. So, if I just removed this and did this in two steps, I would
basically be unoptimizing then re-optimizing the tests.

Some notes:

1. The new guaranteed arc opts is based off of SemanticARCOpts and runs only on
   ossa. Specifically, in this new pass, we just perform simple
   canonicalizations that do not involve any significant analysis. Some
   examples: a copy_value all of whose uses are destroys. This will do what the
   original pass did and more without more compile time. I did a conservative
   first approximation, but we can probably tune this a bit.

2. the reason why I am doing this now is that I was trying to eliminate the
   enable-ownership-stripping-after-serialization flag and discovered that the
   test opaque_value_mandatory implicitly depends on this since sil-opt by
   default was the only place left in the compiler with that option set to false
   by default. So I am eliminating that dependency before I land the larger
   change.
Defining `hash_value` for `Type` makes it easy to
forget that the underlying pointer is being hashed
directly without canonicalization.

Instead, define it only for `CanType`, and make
`Type` users spell `getPointer` explicitly.
It was incorrectly hashing the type as a pointer
but canonicalizing for equality. Change equality
to compare pointers.
Pull request #32244 introduced the use of `std::stringstream` but that
causes vtables to be generated and we don't want that.
[Darwin test config] Use the SDK when running swift/swiftc in tests.
[Reflection] NFC: Workaround LLVM C++ standard library weirdness
…auto_diff_deriv

IRGen: Use the right descriminator for AutoDiffDerivativeFunctions
Remove Type's hash_value function
…bcc7995465d3bf

[arc] Change guaranteed arc opts to be based on SemanticARCOpts and move from Diagnostic pipeline -> Onone pipeline.
…nvenience-inits-for-members

[ClangImporter] Follow-up for #32214, fix assertion hit due to missing check
[TypeChecker] Add a entry point to be used for code completion
@pull pull bot merged commit f159175 into MaxDesiatov:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants