Skip to content

SILOptimizer: fix a phase ordering problem, which prevented array optimizations to work in some cases #19857

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, 2018

Conversation

eeckstein
Copy link
Contributor

Introduce an "early redundant load elimination", which does not optimize loads from arrays.
Later array optimizations, like ABCOpt, get confused if an array load in a loop is converted to a pattern with a phi argument.

This problem was introduced with accessors.

rdar://problem/44184763

…imizations to work in some cases

Introduce an "early redundant load elimination", which does not optimize loads from arrays.
Later array optimizations, like ABCOpt, get confused if an array load in a loop is converted to a pattern with a phi argument.

This problem was introduced with accessors.

rdar://problem/44184763
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@eeckstein eeckstein requested a review from atrick October 12, 2018 17:22
@swift-ci
Copy link
Contributor

Build comment file:

Performance: -O

TEST OLD NEW DELTA RATIO
Improvement
XorLoop 555 396 -28.6% 1.40x
RemoveWhereSwapInts 25 19 -24.0% 1.32x
RemoveWhereMoveInts 14 12 -14.3% 1.17x
ObjectiveCBridgeStubToNSDate2 1471 1336 -9.2% 1.10x (?)

Code size: -O

TEST OLD NEW DELTA RATIO
Regression
Queue.o 12219 14587 +19.4% 0.84x
Improvement
Prims.o 43305 41857 -3.3% 1.03x
PrimsSplit.o 43353 41905 -3.3% 1.03x
RC4.o 5023 4959 -1.3% 1.01x

Performance: -Osize

TEST OLD NEW DELTA RATIO
Regression
IterateData 1594 1808 +13.4% 0.88x (?)
Improvement
XorLoop 613 407 -33.6% 1.51x
RemoveWhereSwapInts 25 19 -24.0% 1.32x
RemoveWhereMoveInts 14 12 -14.3% 1.17x

Code size: -Osize

TEST OLD NEW DELTA RATIO
Improvement
XorLoop.o 2122 2074 -2.3% 1.02x
RC4.o 4137 4073 -1.5% 1.02x
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

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eeckstein eeckstein merged commit 60a4b8b into swiftlang:master Oct 12, 2018
@eeckstein eeckstein deleted the early-rle branch October 12, 2018 20:22
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.

3 participants