Skip to content

SimplifyPointerToAddress: always remove address_to_pointer-pointer_to_address pairs with matching types#89247

Open
eeckstein wants to merge 1 commit into
swiftlang:mainfrom
eeckstein:simplify-pointer-to-address
Open

SimplifyPointerToAddress: always remove address_to_pointer-pointer_to_address pairs with matching types#89247
eeckstein wants to merge 1 commit into
swiftlang:mainfrom
eeckstein:simplify-pointer-to-address

Conversation

@eeckstein
Copy link
Copy Markdown
Contributor

Don't require the strict flag when removing address_to_pointer-pointer_to_address pairs with matching types

rdar://177220346

@eeckstein eeckstein requested a review from atrick May 19, 2026 08:42
@eeckstein
Copy link
Copy Markdown
Contributor Author

@swift-ci smoke test

@eeckstein
Copy link
Copy Markdown
Contributor Author

@swift-ci apple silicon benchmark

@eeckstein eeckstein requested a review from glessard May 19, 2026 08:42
…ss_to_pointer`-`pointer_to_address` pairs with matching types

rdar://177220346
@eeckstein eeckstein force-pushed the simplify-pointer-to-address branch from f9e610c to f11dac4 Compare May 19, 2026 17:02
@eeckstein
Copy link
Copy Markdown
Contributor Author

@swift-ci smoke test

@glessard
Copy link
Copy Markdown
Contributor

Benchmark result:

Performance (arm64): -O

Improvement OLD NEW DELTA RATIO
MutableSpanZeroInit 4759.0 4044.0 -15.0% 1.18x (?)
Data.init.Sequence.64kB.Count 2.028 1.884 -7.1% 1.08x (?)

Code size: -O

Performance (arm64): -Osize

Improvement OLD NEW DELTA RATIO
DataAppendDataLargeToMedium 14718.182 12859.259 -12.6% 1.14x (?)
DataAppendDataSmallToLarge 15885.714 14112.5 -11.2% 1.13x (?)
DataReplaceLarge 14475.0 12900.0 -10.9% 1.12x (?)
DataAppendDataLargeToSmall 14240.0 13041.176 -8.4% 1.09x (?)
DataAppendDataMediumToLarge 15821.429 14533.333 -8.1% 1.09x (?)

Code size: -Osize

Performance (arm64): -Onone

Improvement OLD NEW DELTA RATIO
ObjectiveCBridgeASCIIStringFromFile 0.117 0.0 -99.2% 118.00x (?)
ObjectiveCBridgeStubFromNSDate 6080.0 5200.0 -14.5% 1.17x (?)
String.data.Empty 22.133 19.183 -13.3% 1.15x (?)
StringToDataEmpty 786.975 690.336 -12.3% 1.14x (?)
RawBuffer.copyContents 11.625 10.353 -10.9% 1.12x (?)
String.data.Small 22.15 19.899 -10.2% 1.11x (?)
StringToDataSmall 794.538 714.122 -10.1% 1.11x (?)
ArrayAppendToGeneric 208.372 188.587 -9.5% 1.10x (?)
StringToDataMedium 1423.881 1310.563 -8.0% 1.09x (?)
String.data.Medium 34.412 31.78 -7.6% 1.08x (?)
RawBufferCopyBytes 11.821 10.949 -7.4% 1.08x (?)
BufferFillFromSlice 10.825 10.077 -6.9% 1.07x (?)
StringToDataLargeUnicode 1429.167 1330.469 -6.9% 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 mini
  Model Identifier: Mac14,3
  Total Number of Cores: 8 (4 performance and 4 efficiency)
  Memory: 24 GB

@eeckstein
Copy link
Copy Markdown
Contributor Author

@swift-ci smoke test linux

Copy link
Copy Markdown
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

@augusto2112
Copy link
Copy Markdown
Contributor

@swift-ci smoke test linux

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.

4 participants