Nate Chandler
78c18374c3
[NFC] SIL: Extracted has "any" move-only wrapping.
...
This predicate is used in several places.
2024-06-11 16:25:14 -07:00
Nate Chandler
b5b637c72e
[NFC] SIL: Renamed helper.
...
removing...To -> removing...From
2024-06-11 16:25:11 -07:00
swift-ci
19d9da59d3
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-11 10:54:37 -07:00
Slava Pestov
322ce5a1ab
SIL: Consistently drop substitution map when forming apply instructions
...
Fixes rdar://129298104.
2024-06-11 10:36:15 -04:00
swift-ci
15ebacd934
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-10 22:34:42 -07:00
eeckstein
8dec8f6058
Merge pull request #74259 from eeckstein/fix-fixed-abi-runtime-effects
...
PerformanceDiagnostics: avoid false meta-data alarms for non-loadable types
2024-06-11 07:26:34 +02:00
swift-ci
8c21deb9d0
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-10 11:33:40 -07:00
Erik Eckstein
717880e844
PerformanceDiagnostics: avoid false meta-data alarms for non-loadable types
...
Non-loadable types don't necessarily need metadata, for example, structs with `@_rawLayout`
https://github.com/apple/swift/issues/73951
2024-06-10 18:25:08 +02:00
Nate Chandler
5dc3cf1296
[LifetimeCompletion] Removed "with leaks" mode.
...
Now that the two known issues which resulted in invalid SIL being
provided to lifetime completion have been addressed, tighten up the
completion done on the availability boundary not to allow leaks.
2024-06-06 16:48:46 -07:00
swift-ci
be87ad7bcb
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-06 10:35:38 -07:00
Meghana Gupta
af1d6017f9
Merge pull request #74132 from meg-gupta/deleteresultdependson
...
Remove resultDependsOn/resultDependsOnSelf
2024-06-06 10:23:31 -07:00
swift-ci
a523f4942e
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-05 20:14:34 -07:00
Nate Chandler
84da0ed4c5
[LifetimeCompletion] Add extend_lifetimes.
...
The new instructions are inserted after every "user" (according to
InteriorLiveness' SSAPrunedLiveness instance) outside the linear
liveness boundary.
2024-06-05 16:28:28 -07:00
Nate Chandler
a52cc7ae19
[NFC] LifetimeCompletion: Note boundary kind.
...
When visiting an availability boundary, note what kind of end is
involved. For now, there's only one.
2024-06-05 16:28:28 -07:00
Nate Chandler
81fa65772f
[OwnershipLiveness] End at extend_lifetime.
...
When visiting consumes, also visit `extend_lifetime` instructions.
These instructions are not lifetime ending, but together with the
consumes, they enclose the users of a value.
Add a flag to LinearLiveness to control whether these instructions are
added so that the verifier can use verify that all such instructions
appear outside the linear lifetime boundary (not including them).
2024-06-05 16:28:28 -07:00
Nate Chandler
2a5d07522d
[SIL] Add extend_lifetime instruction.
...
It indicates that the value's lifetime continues to at least this point.
The boundary formed by all consuming uses together with these
instructions will encompass all uses of the value.
2024-06-05 16:28:26 -07:00
Nate Chandler
77d26e1eff
[NFC] LifetimeCompletion: Rename helper fn.
...
It visits the availability boundary, so call it
`visitAvailabilityBoundary`. It's not clear what "unreachable lifetime
ends" are.
2024-06-05 16:27:45 -07:00
Nate Chandler
9d7db52bed
[NFC] PrunedLiveness: Tweaked enum wrapper.
...
Clarify methods. Unfortunately, without other changes I haven't
identified, the `enum class` can't be made an `enum` for ideal usage.
2024-06-05 16:27:45 -07:00
Meghana Gupta
470fa2f365
Remove resultDependsOn/resultDependsOnSelf
2024-06-05 11:36:16 -07:00
swift-ci
089207f2d3
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-04 18:35:07 -07:00
nate-chandler
23915e8075
Merge pull request #74109 from nate-chandler/rdar113142446
...
[ConsumeObjectChecker] End lifetimes at consumes.
2024-06-04 18:17:36 -07:00
swift-ci
6502924e2e
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-04 11:55:06 -07:00
Ellie Shin
6216ec648f
Merge pull request #73902 from apple/elsh/pkg-cmo-inline
...
[SIL][PackageCMO] Allow optimizing [serialized_for_pkg] functions
2024-06-04 11:39:19 -07:00
Nate Chandler
eedc7268f6
[NFC] PrunedLiveness: Promote updateForUse variant
...
Allow users to add instructions to liveness in the same terms that
liveness itself uses.
2024-06-03 15:45:16 -07:00
Nate Chandler
82cb9897da
[Test] Indicate insts with vals.
...
If a value is defined by an instruction, it's often more convenient to
specify the instruction by the value.
2024-06-03 15:45:10 -07:00
swift-ci
5abac881ad
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-02 15:34:45 -07:00
Michael Gottesman
1d8ea84fa3
[region-isolation] When determining isolation of a full apply site... use the isolated parameter, not self.
...
This was ok in the small since most of the time we were processing a self
parameter as isolated... but that isn't always true...
2024-06-01 23:25:16 -07:00
swift-ci
7f0390efb8
Merge remote-tracking branch 'origin/main' into rebranch
2024-06-01 11:17:38 -07:00
Andrew Trick
e06fc99667
Fix SILCombine to delete dead end_access instructions.
...
Otherwise, the SILVerifier will raise an error.
Fixes rdar://121599876 (SILCombine should delete instructions in
blocks dominated by cond_fail -1)
2024-05-31 23:01:34 -07:00
swift-ci
2aff268350
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-30 20:34:28 -07:00
Alejandro Alonso
324cb2df1f
Merge pull request #73955 from Azoy/show-me-those-moves
...
[IRGen] Add option for raw layout to move as its like type
2024-05-30 20:32:49 -07:00
swift-ci
63205ba9a2
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-30 09:54:36 -07:00
Emil Pedersen
531469f70e
Merge pull request #73864 from Snowy1803/scs-builder-skip-meta
...
Skip meta instructions for Builder.init with automatic location
2024-05-30 09:50:48 -07:00
Ellie Shin
c3ded85c4f
Update SILBridgedFunction APIs.
...
Add isAnySerialized() and canBeInlinedIntoCaller(SerializedKind).
2024-05-29 15:54:36 -07:00
swift-ci
bc80f1ca21
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-28 17:50:40 -07:00
Tim Kientzle
65f78e6268
Merge pull request #73675 from tbkka/tbkka-assertions-v2
...
New assertions support
2024-05-28 17:25:21 -07:00
Alejandro Alonso
a9da08ccb6
Add option for raw layout to move as its like type
2024-05-28 14:34:22 -07:00
Ellie Shin
4ecfc96578
[SIL][PackageCMO] Allow optimizing [serialized_for_pkg] functions during SIL
...
inlining, generic/closure specialization, and devirtualization optimization passes.
SILFunction::canBeInlinedIntoCaller now exlicitly requires a caller's SerializedKind_t arg.
isAnySerialized() is added as a convenience function that checks if [serialized] or [serialized_for_pkg].
Resolves rdar://128704752
2024-05-27 23:05:56 -07:00
swift-ci
18f4826b9d
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-24 15:54:04 -07:00
Emil Pedersen
a7a80130c2
Merge pull request #73866 from Snowy1803/silgen-description
...
[DebugInfo] [SILGen] Always use emitDebugDescription (NFCI)
2024-05-24 15:34:17 -07:00
swift-ci
112cf2df58
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-24 10:15:07 -07:00
Emil Pedersen
4b1ce86f48
Add Location.isInlined to SwiftCompilerSources
2024-05-23 16:04:05 -07:00
Ellie Shin
5ccc4cd394
SIL function can be serialized with different kinds: [serialized] or
...
[serialized_for_package] if Package CMO is enabled. The latter kind
allows a function to be serialized even if it contains loadable types,
if Package CMO is enabled. Renamed IsSerialized_t as SerializedKind_t.
The tri-state serialization kind requires validating inlinability
depending on the serialization kinds of callee vs caller; e.g. if the
callee is [serialized_for_package], the caller must be _not_ [serialized].
Renamed `hasValidLinkageForFragileInline` as `canBeInlinedIntoCaller`
that takes in its caller's SerializedKind as an argument. Another argument
`assumeFragileCaller` is also added to ensure that the calle sites of
this function know the caller is serialized unless it's called for SIL
inlining optimization passes.
The [serialized_for_package] attribute is allowed for SIL function, global var,
v-table, and witness-table.
Resolves rdar://128406520
2024-05-23 15:53:02 -07:00
swift-ci
7e6e6abd06
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-23 15:13:50 -07:00
Kshitij Jain
64da348ee9
Merge pull request #73688 from jkshtj/main
...
[Autodiff] Adds logic to rewrite call-sites using functions specialized by the closure-spec optimization
2024-05-23 14:21:31 -07:00
Emil Pedersen
0bc6ece9db
[DebugInfo] [SILGen] Always use emitDebugDescription (NFCI)
2024-05-23 14:05:13 -07:00
swift-ci
de49abb425
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-23 03:15:39 -07:00
Erik Eckstein
2e440d78ee
SILBridging: fix a compiler warning when building with pure bridging mode (e.g. in Debug)
2024-05-23 09:01:49 +02:00
swift-ci
50ff2bfca4
Merge remote-tracking branch 'origin/main' into rebranch
2024-05-22 10:34:59 -07:00
eeckstein
7c69bec9b4
Merge pull request #73782 from eeckstein/static-arrays-in-embedded
...
IRGen: support read-only statically initialized arrays in embedded swift
2024-05-22 19:34:42 +02:00