Skip to content

Convert 2 module passes to function passes #4372

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 2 commits into from
Aug 18, 2016

Conversation

eeckstein
Copy link
Contributor

What's in this pull request?

Resolved bug number: (SR-)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

A smoke test on macOS does the following:

  1. Builds the compiler incrementally.
  2. Builds the standard library only for macOS. Simulator standard libraries and
    device standard libraries are not built.
  3. lldb is not built.
  4. The test and validation-test targets are run only for macOS. The optimized
    version of these tests are not run.

A smoke test on Linux does the following:

  1. Builds the compiler incrementally.
  2. Builds the standard library incrementally.
  3. lldb is built incrementally.
  4. The swift test and validation-test targets are run. The optimized version of these
    tests are not run.
  5. lldb is tested.

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@eeckstein
Copy link
Contributor Author

@swift-ci Please benchmark

1 similar comment
@eeckstein
Copy link
Contributor Author

@swift-ci Please benchmark

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (2)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeFromNSArrayAnyObjectForced 6095 6668 +9.4% 0.91x(?)
Array2D 1956 2130 +8.9% 0.92x(?)

Improvement (4)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeFromNSArrayAnyObjectToString 129466 122220 -5.6% 1.06x(?)
ObjectiveCBridgeToNSSet 16903 15823 -6.4% 1.07x(?)
ObjectiveCBridgeStubToNSStringRef 125 116 -7.2% 1.08x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 164367 150673 -8.3% 1.09x(?)

No Changes (130)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubToNSDate 13694 12999 -5.1% 1.05x
Chars 621 593 -4.5% 1.05x
ArrayLiteral 1051 1011 -3.8% 1.04x
ErrorHandling 2971 2882 -3.0% 1.03x(?)
ObjectiveCBridgeStubToArrayOfNSString 30883 30055 -2.7% 1.03x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 125157 121669 -2.8% 1.03x(?)
ObjectiveCBridgeToNSString 1060 1042 -1.7% 1.02x(?)
135 3399842 3338650 -1.8% 1.02x
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 229829 226349 -1.5% 1.02x(?)
ProtocolDispatch 3036 2978 -1.9% 1.02x(?)
AngryPhonebook 2889 2832 -2.0% 1.02x(?)
MapReduce 388 379 -2.3% 1.02x(?)
Hanoi 3366 3308 -1.7% 1.02x(?)
Dictionary 795 781 -1.8% 1.02x
ObjectiveCBridgeStubDataAppend 3095 3022 -2.4% 1.02x(?)
NSDictionaryCastToSwift 13395 13128 -2.0% 1.02x(?)
StringBuilder 1326 1306 -1.5% 1.02x
ObjectiveCBridgeStubFromArrayOfNSString 90466 88462 -2.2% 1.02x(?)
ArraySubscript 1390 1379 -0.8% 1.01x(?)
SortStrings 2235 2217 -0.8% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 5074 5035 -0.8% 1.01x(?)
StringWithCString 148805 147779 -0.7% 1.01x(?)
DictionarySwap 772 761 -1.4% 1.01x(?)
ObjectiveCBridgeFromNSString 1868 1852 -0.9% 1.01x(?)
XorLoop 361 359 -0.6% 1.01x
ObjectAllocation 151 150 -0.7% 1.01x(?)
ObjectiveCBridgeStubURLAppendPathRef 231275 229956 -0.6% 1.01x(?)
NSError 343 339 -1.2% 1.01x(?)
IterateData 2498 2464 -1.4% 1.01x(?)
SetIntersect 1136 1130 -0.5% 1.01x(?)
ArrayOfGenericRef 3610 3580 -0.8% 1.01x
ObjectiveCBridgeStubDateAccess 181 179 -1.1% 1.01x(?)
Sim2DArray 385 380 -1.3% 1.01x(?)
SetIsSubsetOf_OfObjects 481 476 -1.0% 1.01x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4260 4205 -1.3% 1.01x(?)
ObjectiveCBridgeStubNSDataAppend 2472 2442 -1.2% 1.01x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 131085 129664 -1.1% 1.01x(?)
StringWalk 5642 5602 -0.7% 1.01x(?)
DictionarySwapOfObjects 6651 6669 +0.3% 1.00x(?)
StackPromo 19003 19063 +0.3% 1.00x(?)
RecursiveOwnedParameter 1846 1842 -0.2% 1.00x(?)
ObjectiveCBridgeStubToNSString 1215 1210 -0.4% 1.00x(?)
ClassArrayGetter 12 12 +0.0% 1.00x
Histogram 659 659 +0.0% 1.00x
DictionaryBridge 4058 4077 +0.5% 1.00x(?)
ObjectiveCBridgeStubFromNSDateRef 3659 3650 -0.2% 1.00x(?)
MonteCarloPi 42465 42455 -0.0% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2636 2647 +0.4% 1.00x(?)
SortLettersInPlace 956 960 +0.4% 1.00x(?)
PopFrontArray 1112 1110 -0.2% 1.00x(?)
ArrayOfGenericPOD 207 207 +0.0% 1.00x
RangeAssignment 315 315 +0.0% 1.00x
StringHasPrefix 642 642 +0.0% 1.00x
ByteSwap 1 1 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 762 760 -0.3% 1.00x(?)
TypeFlood 0 0 +0.0% 1.00x
ProtocolDispatch2 159 159 +0.0% 1.00x
HashTest 1714 1718 +0.2% 1.00x(?)
Dictionary3 521 519 -0.4% 1.00x(?)
SetIntersect_OfObjects 2272 2277 +0.2% 1.00x(?)
Join 453 451 -0.4% 1.00x(?)
ArrayOfRef 3539 3522 -0.5% 1.00x(?)
ObjectiveCBridgeStubDateMutation 267 266 -0.4% 1.00x(?)
DictionaryOfObjects 2319 2312 -0.3% 1.00x(?)
ObjectiveCBridgeStubToNSDateRef 3264 3272 +0.2% 1.00x(?)
PolymorphicCalls 14 14 +0.0% 1.00x
RC4 252 252 +0.0% 1.00x
Calculator 34 34 +0.0% 1.00x
OpenClose 50 50 +0.0% 1.00x
DictionaryRemoveOfObjects 19980 20049 +0.3% 1.00x(?)
UTF8Decode 311 312 +0.3% 1.00x(?)
SortStringsUnicode 8980 9002 +0.2% 1.00x(?)
SetIsSubsetOf 486 486 +0.0% 1.00x
NopDeinit 36179 36073 -0.3% 1.00x(?)
SetExclusiveOr 3856 3866 +0.3% 1.00x(?)
RGBHistogramOfObjects 21641 21575 -0.3% 1.00x(?)
ObjectiveCBridgeStubNSDateRefAccess 334 334 +0.0% 1.00x
StrToInt 5055 5047 -0.2% 1.00x(?)
Phonebook 7090 7111 +0.3% 1.00x(?)
SetExclusiveOr_OfObjects 8293 8277 -0.2% 1.00x(?)
ObjectiveCBridgeToNSDictionary 17396 17443 +0.3% 1.00x(?)
MonteCarloE 10049 10013 -0.4% 1.00x(?)
SetUnion_OfObjects 6976 6960 -0.2% 1.00x(?)
Walsh 345 346 +0.3% 1.00x(?)
ArrayAppend 743 742 -0.1% 1.00x(?)
DictionaryRemove 5041 5054 +0.3% 1.00x(?)
LinkedList 6844 6815 -0.4% 1.00x(?)
NSStringConversion 796 796 +0.0% 1.00x
RGBHistogram 3110 3102 -0.3% 1.00x(?)
ArrayValueProp4 5 5 +0.0% 1.00x
DeadArray 182 182 +0.0% 1.00x
BitCount 1 1 +0.0% 1.00x
ArrayValueProp 5 5 +0.0% 1.00x
GlobalClass 0 0 +0.0% 1.00x
Memset 222 222 +0.0% 1.00x
ArrayValueProp2 5 5 +0.0% 1.00x
ArrayValueProp3 5 5 +0.0% 1.00x
ObjectiveCBridgeStubFromNSDate 3718 3701 -0.5% 1.00x(?)
Prims 762 769 +0.9% 0.99x(?)
Dictionary3OfObjects 869 875 +0.7% 0.99x(?)
SuperChars 207187 209384 +1.1% 0.99x(?)
Dictionary2 2038 2057 +0.9% 0.99x(?)
StrComplexWalk 2838 2880 +1.5% 0.99x(?)
PopFrontArrayGeneric 1134 1147 +1.1% 0.99x
PopFrontUnsafePointer 8755 8804 +0.6% 0.99x(?)
StringEqualPointerComparison 7301 7396 +1.3% 0.99x(?)
DictionaryLiteral 4609 4637 +0.6% 0.99x(?)
ObjectiveCBridgeStubURLAppendPath 230217 231701 +0.6% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObject 76753 77580 +1.1% 0.99x(?)
ArrayInClass 85 86 +1.2% 0.99x(?)
StringHasSuffixUnicode 62127 63053 +1.5% 0.99x(?)
StringHasPrefixUnicode 13801 13909 +0.8% 0.99x(?)
ArrayOfPOD 171 172 +0.6% 0.99x
SetUnion 2683 2701 +0.7% 0.99x(?)
AnyHashableWithAClass 66249 67178 +1.4% 0.99x(?)
Dictionary2OfObjects 3427 3472 +1.3% 0.99x(?)
ArrayAppendReserved 517 522 +1.0% 0.99x(?)
TwoSum 1901 1918 +0.9% 0.99x(?)
ObjectiveCBridgeStubFromNSStringRef 124 127 +2.4% 0.98x
StaticArray 2813 2857 +1.6% 0.98x(?)
ObjectiveCBridgeToNSArray 31467 31976 +1.6% 0.98x(?)
CaptureProp 4164 4230 +1.6% 0.98x(?)
StringHasSuffix 667 679 +1.8% 0.98x(?)
SevenBoom 1392 1415 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 251375 259890 +3.4% 0.97x(?)
StringInterpolation 10611 10992 +3.6% 0.97x
ObjectiveCBridgeFromNSSetAnyObject 301423 311622 +3.4% 0.97x(?)
ObjectiveCBridgeStubNSDateMutationRef 12051 12408 +3.0% 0.97x(?)
Integrate 238 247 +3.8% 0.96x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 158653 167252 +5.4% 0.95x
**Unoptimized (Onone)**

Regression (9)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubToNSStringRef 156 187 +19.9% 0.83x
Integrate 363 397 +9.4% 0.91x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 157828 172913 +9.6% 0.91x
ObjectiveCBridgeStubDateAccess 1132 1248 +10.2% 0.91x
ObjectiveCBridgeFromNSSetAnyObjectForced 7603 8275 +8.8% 0.92x(?)
ObjectiveCBridgeFromNSString 4985 5396 +8.2% 0.92x(?)
TypeFlood 148 158 +6.8% 0.94x
Phonebook 60740 64892 +6.8% 0.94x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 132999 140935 +6.0% 0.94x

Improvement (0)

No Changes (127)

TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ObjectiveCBridgeStubFromArrayOfNSString 92869 88325 -4.9% 1.05x(?)
DictionarySwapOfObjects 25588 24492 -4.3% 1.04x
ObjectiveCBridgeToNSString 1104 1075 -2.6% 1.03x(?)
RangeAssignment 24427 23701 -3.0% 1.03x(?)
RC4 8930 8698 -2.6% 1.03x
StringWalk 22194 21621 -2.6% 1.03x
OpenClose 455 444 -2.4% 1.02x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 268401 263032 -2.0% 1.02x
SuperChars 256006 251892 -1.6% 1.02x(?)
CaptureProp 117207 115308 -1.6% 1.02x(?)
ObjectiveCBridgeStubDataAppend 3395 3339 -1.6% 1.02x(?)
PopFrontArray 24331 24136 -0.8% 1.01x(?)
135 6150643 6089145 -1.0% 1.01x
Histogram 13585 13398 -1.4% 1.01x(?)
DictionaryBridge 4137 4100 -0.9% 1.01x(?)
ObjectiveCBridgeStubFromNSDateRef 4136 4083 -1.3% 1.01x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 10446 10329 -1.1% 1.01x(?)
Dictionary3OfObjects 2646 2626 -0.8% 1.01x(?)
StrComplexWalk 8035 7940 -1.2% 1.01x(?)
StaticArray 28026 27747 -1.0% 1.01x(?)
ObjectiveCBridgeToNSArray 31910 31664 -0.8% 1.01x(?)
PopFrontArrayGeneric 9641 9565 -0.8% 1.01x
PopFrontUnsafePointer 244781 243325 -0.6% 1.01x(?)
IterateData 10471 10358 -1.1% 1.01x(?)
Hanoi 19532 19425 -0.6% 1.01x(?)
DictionaryRemoveOfObjects 60805 60481 -0.5% 1.01x(?)
Dictionary 2696 2658 -1.4% 1.01x(?)
NopDeinit 60372 59773 -1.0% 1.01x(?)
RGBHistogram 50428 49763 -1.3% 1.01x(?)
ArrayAppendReserved 3386 3354 -0.9% 1.01x(?)
ObjectiveCBridgeStubNSDataAppend 2810 2792 -0.6% 1.01x(?)
ArrayValueProp 2269 2244 -1.1% 1.01x(?)
Dictionary2OfObjects 6903 6815 -1.3% 1.01x(?)
ArraySubscript 5545 5570 +0.5% 1.00x(?)
MonteCarloPi 51119 50941 -0.3% 1.00x(?)
RecursiveOwnedParameter 10110 10127 +0.2% 1.00x(?)
ClassArrayGetter 1258 1258 +0.0% 1.00x
Array2D 809628 808452 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 7465 7493 +0.4% 1.00x(?)
StringWithCString 147225 147816 +0.4% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 3014 3000 -0.5% 1.00x(?)
Prims 14559 14600 +0.3% 1.00x(?)
ByteSwap 10 10 +0.0% 1.00x
ObjectiveCBridgeStubToNSDate 13568 13606 +0.3% 1.00x(?)
ObjectiveCBridgeStubFromNSStringRef 167 167 +0.0% 1.00x
ObjectAllocation 545 543 -0.4% 1.00x(?)
ProtocolDispatch2 446 446 +0.0% 1.00x
Dictionary3 1990 1996 +0.3% 1.00x(?)
SetIntersect_OfObjects 19384 19306 -0.4% 1.00x(?)
Join 1451 1450 -0.1% 1.00x(?)
Calculator 963 965 +0.2% 1.00x(?)
MapReduce 44532 44624 +0.2% 1.00x(?)
ObjectiveCBridgeStubURLAppendPath 234215 235060 +0.4% 1.00x(?)
SortStringsUnicode 9555 9572 +0.2% 1.00x(?)
SetExclusiveOr 44112 43939 -0.4% 1.00x(?)
ObjectiveCBridgeStubNSDateRefAccess 1247 1248 +0.1% 1.00x(?)
ArrayInClass 3679 3682 +0.1% 1.00x(?)
ArrayOfGenericRef 9717 9751 +0.3% 1.00x(?)
StringHasSuffix 1549 1547 -0.1% 1.00x(?)
Sim2DArray 14151 14102 -0.3% 1.00x(?)
SetExclusiveOr_OfObjects 63266 63142 -0.2% 1.00x(?)
SetUnion_OfObjects 46824 46871 +0.1% 1.00x(?)
Walsh 12342 12364 +0.2% 1.00x(?)
SetIsSubsetOf_OfObjects 2885 2896 +0.4% 1.00x(?)
ArrayAppend 3541 3545 +0.1% 1.00x(?)
DictionaryRemove 29049 29155 +0.4% 1.00x(?)
StringHasPrefixUnicode 15210 15257 +0.3% 1.00x(?)
LinkedList 26312 26344 +0.1% 1.00x(?)
SetUnion 29677 29681 +0.0% 1.00x(?)
Chars 5283 5257 -0.5% 1.00x(?)
BitCount 91 91 +0.0% 1.00x
AnyHashableWithAClass 78113 78242 +0.2% 1.00x(?)
ArrayValueProp3 2753 2748 -0.2% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
Memset 19798 19865 +0.3% 1.00x(?)
SortLettersInPlace 2536 2560 +0.9% 0.99x(?)
XorLoop 18632 18768 +0.7% 0.99x(?)
StringInterpolation 15484 15591 +0.7% 0.99x(?)
ProtocolDispatch 5928 5995 +1.1% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObject 314082 316618 +0.8% 0.99x(?)
AngryPhonebook 2968 2996 +0.9% 0.99x(?)
Dictionary2 4912 4985 +1.5% 0.99x(?)
ObjectiveCBridgeStubURLAppendPathRef 237736 240490 +1.2% 0.99x(?)
ObjectiveCBridgeStubDateMutation 513 518 +1.0% 0.99x(?)
NSError 700 707 +1.0% 0.99x(?)
DictionaryOfObjects 5467 5533 +1.2% 0.99x(?)
ObjectiveCBridgeStubToNSDateRef 3202 3233 +1.0% 0.99x(?)
StringEqualPointerComparison 9791 9849 +0.6% 0.99x(?)
DictionaryLiteral 25244 25579 +1.3% 0.99x(?)
UTF8Decode 43105 43596 +1.1% 0.99x
SetIsSubsetOf 2991 3028 +1.2% 0.99x(?)
ObjectiveCBridgeFromNSArrayAnyObject 77932 78858 +1.2% 0.99x(?)
NSDictionaryCastToSwift 14551 14737 +1.3% 0.99x(?)
RGBHistogramOfObjects 99666 100209 +0.5% 0.99x(?)
StringBuilder 2666 2682 +0.6% 0.99x(?)
MonteCarloE 107336 108213 +0.8% 0.99x(?)
StringHasSuffixUnicode 64718 65367 +1.0% 0.99x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 181955 183904 +1.1% 0.99x(?)
ArrayLiteral 1085 1092 +0.7% 0.99x(?)
NSStringConversion 2955 2983 +0.9% 0.99x(?)
ArrayOfPOD 2303 2317 +0.6% 0.99x(?)
DeadArray 116319 117417 +0.9% 0.99x(?)
ObjectiveCBridgeStubNSDateMutationRef 13723 13927 +1.5% 0.99x(?)
TwoSum 8910 8999 +1.0% 0.99x(?)
ArrayValueProp2 2795 2826 +1.1% 0.99x(?)
StackPromo 130579 133549 +2.3% 0.98x(?)
ObjectiveCBridgeStubToNSString 1315 1336 +1.6% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 235536 239286 +1.6% 0.98x(?)
SortStrings 2615 2670 +2.1% 0.98x(?)
DictionarySwap 10240 10470 +2.2% 0.98x
ErrorHandling 3754 3843 +2.4% 0.98x(?)
HashTest 5113 5194 +1.6% 0.98x(?)
StringHasPrefix 1497 1535 +2.5% 0.98x(?)
ArrayOfRef 8980 9131 +1.7% 0.98x
PolymorphicCalls 1117 1145 +2.5% 0.98x(?)
ArrayOfGenericPOD 3527 3594 +1.9% 0.98x(?)
ObjectiveCBridgeStubToArrayOfNSString 30155 30877 +2.4% 0.98x(?)
SetIntersect 19278 19605 +1.7% 0.98x
ArrayValueProp4 2634 2677 +1.6% 0.98x(?)
ObjectiveCBridgeStubFromNSDate 3991 4079 +2.2% 0.98x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToString 123844 127913 +3.3% 0.97x(?)
ObjectiveCBridgeToNSSet 16892 17337 +2.6% 0.97x
StrToInt 5463 5624 +3.0% 0.97x
ObjectiveCBridgeStubFromNSString 792 823 +3.9% 0.96x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 128997 134955 +4.6% 0.96x
SevenBoom 1569 1631 +4.0% 0.96x
ObjectiveCBridgeToNSDictionary 16928 17752 +4.9% 0.95x(?)
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i7 Processor Speed: 3 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 4 MB Memory: 16 GB

@tkremenek
Copy link
Member

@swift-ci test macOS

@eeckstein eeckstein merged commit aa2e7f6 into swiftlang:master Aug 18, 2016
@eeckstein eeckstein deleted the function-passes branch August 18, 2016 18:36
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