Skip to content

CopyPropagation: Avoid regenerating destroys. #39672

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 1 commit into from
Oct 12, 2021

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Oct 9, 2021

CanonicalizeOSSA is now used iteratively in SILCombine. To avoid
endless worklist iteration based on whether InstructionDeleter's
callbacks fired, ensure that destroys are only deleted and recreated
when necessary.

CanonicalizeOSSA is now used iteratively in SILCombine. To avoid
endless worklist iteration based on whether InstructionDeleter's
callbacks fired, ensure that destroys are only deleted and recreated
when necessary.
@atrick
Copy link
Contributor Author

atrick commented Oct 9, 2021

@swift-ci test

@atrick
Copy link
Contributor Author

atrick commented Oct 12, 2021

@swift-ci benchmark

@atrick
Copy link
Contributor Author

atrick commented Oct 12, 2021

@swift-ci smoke test

@swift-ci
Copy link
Contributor

Performance (x86_64): -O

Regression OLD NEW DELTA RATIO
FlattenListFlatMap 2397 2653 +10.7% 0.90x (?)
 
Improvement OLD NEW DELTA RATIO
DataSubscriptSmall 23 15 -34.8% 1.53x
Data.append.Sequence.64kB.Count.I 44 29 -34.1% 1.52x
Data.append.Sequence.64kB.Count 44 29 -34.1% 1.52x
DataCreateSmallArray 2250 1600 -28.9% 1.41x
Data.append.Sequence.809B.Count.I 80 62 -22.5% 1.29x
Data.append.Sequence.809B.Count 79 62 -21.5% 1.27x (?)
Data.init.Sequence.64kB.Count.RE.I 20 16 -20.0% 1.25x
Data.init.Sequence.64kB.Count.RE 20 16 -20.0% 1.25x (?)
Data.init.Sequence.809B.Count.RE.I 43 38 -11.6% 1.13x (?)
Data.init.Sequence.809B.Count.RE 42 38 -9.5% 1.11x (?)
Data.init.Sequence.64kB.Count0.RE.I 184 168 -8.7% 1.10x (?)
Data.init.Sequence.64kB.Count0.RE 183 168 -8.2% 1.09x (?)
StringToDataSmall 750 700 -6.7% 1.07x (?)

Code size: -O

Improvement OLD NEW DELTA RATIO
DataBenchmarks.o 61878 59931 -3.1% 1.03x
UTF8Decode.o 24019 23381 -2.7% 1.03x
ObjectiveCBridging.o 59073 58209 -1.5% 1.01x

Performance (x86_64): -Osize

Regression OLD NEW DELTA RATIO
Data.append.Sequence.64kB.Count.RE.I 20 29 +45.0% 0.69x
Data.append.Sequence.64kB.Count.RE 20 29 +45.0% 0.69x
DataAppendSequence 5500 7000 +27.3% 0.79x (?)
ObjectiveCBridgeStubDateAccess 130 152 +16.9% 0.86x (?)
DataReplaceMediumBuffer 2600 2900 +11.5% 0.90x (?)
DataCreateEmptyArray 900 1000 +11.1% 0.90x (?)
ProtocolDispatch 239 261 +9.2% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
Data.append.Sequence.64kB.Count.I 58 30 -48.3% 1.93x
Data.append.Sequence.64kB.Count 58 30 -48.3% 1.93x
Data.init.Sequence.64kB.Count 58 30 -48.3% 1.93x
Data.init.Sequence.2047B.Count.I 98 52 -46.9% 1.88x
Data.init.Sequence.2049B.Count.I 98 52 -46.9% 1.88x
Data.init.Sequence.64kB.Count.I 58 32 -44.8% 1.81x
Data.init.Sequence.809B.Count 84 50 -40.5% 1.68x
Data.init.Sequence.809B.Count.I 84 50 -40.5% 1.68x
Data.init.Sequence.511B.Count.I 92 60 -34.8% 1.53x
Data.init.Sequence.64kB.Count.RE.I 29 19 -34.5% 1.53x
Data.init.Sequence.64kB.Count.RE 29 19 -34.5% 1.53x
Data.init.Sequence.513B.Count.I 93 61 -34.4% 1.52x
Data.append.Sequence.809B.Count 98 65 -33.7% 1.51x
Data.append.Sequence.809B.Count.I 98 65 -33.7% 1.51x
DataSubscriptSmall 26 19 -26.9% 1.37x
Data.init.Sequence.809B.Count.RE 55 42 -23.6% 1.31x
Data.init.Sequence.809B.Count.RE.I 55 42 -23.6% 1.31x
DataCountMedium 17 15 -11.8% 1.13x (?)

Code size: -Osize

Improvement OLD NEW DELTA RATIO
DataBenchmarks.o 52105 50934 -2.2% 1.02x

Performance (x86_64): -Onone

Improvement OLD NEW DELTA RATIO
DataReplaceLargeBuffer 12 11 -8.3% 1.09x (?)

Code size: -swiftlibs

How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini8,1
  Processor Name: 6-Core Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@atrick atrick merged commit d5bbb58 into swiftlang:main Oct 12, 2021
@atrick atrick deleted the copyprop-reusedestroy branch October 12, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants