Skip to content

SILOptimizer: run the GlobalOpt pass in the mandatory pipeline. #39974

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 30, 2021

Conversation

eeckstein
Copy link
Contributor

Replace the dynamic initialization of trivial globals with statically initialized globals.
This is required to be able to use global variables in performance-annotated functions.
Also, it's a small performance improvement for -Onone.

@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Performance (x86_64): -O

Regression OLD NEW DELTA RATIO
NSError 167 203 +21.6% 0.82x (?)
ObjectiveCBridgeStubFromNSDateRef 4380 5030 +14.8% 0.87x (?)

Code size: -O

Performance (x86_64): -Osize

Regression OLD NEW DELTA RATIO
ArrayAppendGenericStructs 2140 2480 +15.9% 0.86x (?)
 
Improvement OLD NEW DELTA RATIO
ObjectiveCBridgeFromNSArrayAnyObjectForced 7300 6620 -9.3% 1.10x (?)
StringToDataLargeUnicode 3950 3600 -8.9% 1.10x (?)

Code size: -Osize

Performance (x86_64): -Onone

Regression OLD NEW DELTA RATIO
ArrayAppendOptionals 1370 1560 +13.9% 0.88x (?)
 
Improvement OLD NEW DELTA RATIO
ExclusivityIndependent 190 177 -6.8% 1.07x (?)

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 Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

@eeckstein eeckstein force-pushed the mandatory-globalopt branch from c68dc9a to 69ed2e4 Compare October 29, 2021 10:11
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - c68dc9a

@eeckstein
Copy link
Contributor Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 69ed2e453659753081bb255f14ce5800695603a9

@eeckstein
Copy link
Contributor Author

@swift-ci test linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 69ed2e453659753081bb255f14ce5800695603a9

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 69ed2e453659753081bb255f14ce5800695603a9

@eeckstein eeckstein force-pushed the mandatory-globalopt branch from 69ed2e4 to 06c9686 Compare October 29, 2021 18:32
@eeckstein
Copy link
Contributor Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 06c9686f7101d27d8f9c19c844838e9d19544116

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 06c9686f7101d27d8f9c19c844838e9d19544116

Replace the dynamic initialization of trivial globals with statically initialized globals, even in -Onone.
This is required to be able to use global variables in performance-annotated functions.
Also, it's a small performance improvement for -Onone.
@eeckstein eeckstein force-pushed the mandatory-globalopt branch from 06c9686 to c578c93 Compare October 29, 2021 20:36
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 3290833 into swiftlang:main Oct 30, 2021
@eeckstein eeckstein deleted the mandatory-globalopt branch October 30, 2021 19:50
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