Skip to content

[pass-manager] Do not run mandatory opts until fix point, just run one iteration. #6266

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
Dec 14, 2016

Conversation

gottesmm
Copy link
Contributor

[pass-manager] Do not run mandatory opts until fix point, just run one iteration.

This is most likely an oversight. We should have removed it when the bottom up
pass manager was added.

rdar://29650781

…e iteration.

This is most likely an oversight. We should have removed it when the bottom up
pass manager was added.

rdar://29650781
@gottesmm
Copy link
Contributor Author

@swift-ci Please benchmark

@gottesmm
Copy link
Contributor Author

@swift-ci Please smoke test

@swift-ci
Copy link
Contributor

Build comment file:

Optimized (O)

Regression (1)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
PopFrontArrayGeneric 1124 1259 +12.0% 0.89x(?)
Improvement (2)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ClassArrayGetter 13 12 -7.7% 1.08x(?)
PopFrontArray 1255 1132 -9.8% 1.11x(?)
No Changes (144)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
ArrayInClass 63 62 -1.6% 1.02x(?)
StrComplexWalk 2895 2876 -0.7% 1.01x(?)
ArrayAppendGenericStructs 1237 1230 -0.6% 1.01x(?)
ArrayAppendLazyMap 848 843 -0.6% 1.01x(?)
ErrorHandling 2960 2939 -0.7% 1.01x(?)
ObjectiveCBridgeToNSSet 39873 39627 -0.6% 1.01x(?)
ObjectiveCBridgeStubToArrayOfNSString 29389 29108 -1.0% 1.01x(?)
ObjectiveCBridgeToNSDictionary 62440 61895 -0.9% 1.01x(?)
ObjectiveCBridgeStubFromArrayOfNSString 58174 57846 -0.6% 1.01x(?)
ArraySubscript 1456 1461 +0.3% 1.00x(?)
ObjectiveCBridgeToNSString 1074 1075 +0.1% 1.00x(?)
DictionarySwapOfObjects 6246 6257 +0.2% 1.00x(?)
StackPromo 21449 21411 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 177019 177225 +0.1% 1.00x(?)
RecursiveOwnedParameter 1933 1934 +0.1% 1.00x(?)
Integrate 238 238 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObjectToString 116528 116887 +0.3% 1.00x(?)
Array2D 2044 2043 -0.1% 1.00x(?)
Histogram 293 293 +0.0% 1.00x
SortStrings 1830 1830 +0.0% 1.00x
DictionaryBridge 3704 3697 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 5399 5397 -0.0% 1.00x(?)
ObjectiveCBridgeStubFromNSDateRef 3857 3856 -0.0% 1.00x(?)
MonteCarloPi 45141 45131 -0.0% 1.00x(?)
StringWithCString 198767 198972 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 6128 6112 -0.3% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 2608 2609 +0.0% 1.00x(?)
Prims 731 728 -0.4% 1.00x(?)
SortLettersInPlace 972 973 +0.1% 1.00x(?)
DictionarySwap 413 413 +0.0% 1.00x
ObjectiveCBridgeFromNSString 1764 1762 -0.1% 1.00x(?)
ArrayOfGenericPOD 220 220 +0.0% 1.00x
Dictionary3OfObjects 871 870 -0.1% 1.00x(?)
RangeAssignment 280 281 +0.4% 1.00x(?)
ByteSwap 0 0 +0.0% 1.00x
XorLoop 380 380 +0.0% 1.00x
ArrayAppendReserved 536 536 +0.0% 1.00x
StringInterpolation 10904 10942 +0.3% 1.00x(?)
ObserverClosure 1988 1992 +0.2% 1.00x(?)
ObjectiveCBridgeStubToNSString 1279 1278 -0.1% 1.00x(?)
ArrayAppendStrings 12129 12106 -0.2% 1.00x(?)
ObjectiveCBridgeStubFromNSStringRef 140 140 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 756 756 +0.0% 1.00x
ProtocolDispatch 3039 3039 +0.0% 1.00x
ObjectAllocation 153 153 +0.0% 1.00x
TypeFlood 0 0 +0.0% 1.00x
ObjectiveCBridgeFromNSSetAnyObject 84623 84567 -0.1% 1.00x(?)
ArrayLiteral 1181 1182 +0.1% 1.00x(?)
ProtocolDispatch2 159 159 +0.0% 1.00x
Walsh 321 321 +0.0% 1.00x
Dictionary3 521 521 +0.0% 1.00x
Dictionary2 1998 1998 +0.0% 1.00x
StringHasPrefix 748 750 +0.3% 1.00x(?)
SetIntersect_OfObjects 1498 1496 -0.1% 1.00x(?)
Join 463 463 +0.0% 1.00x
ArrayOfRef 3543 3544 +0.0% 1.00x(?)
ObserverUnappliedMethod 2422 2418 -0.2% 1.00x(?)
ObjectiveCBridgeStubURLAppendPathRef 230755 230815 +0.0% 1.00x(?)
ArrayAppendOptionals 1238 1235 -0.2% 1.00x(?)
NSError 326 326 +0.0% 1.00x
DictionaryOfObjects 2279 2280 +0.0% 1.00x(?)
ObjectiveCBridgeStubToNSDateRef 3284 3284 +0.0% 1.00x
PopFrontUnsafePointer 9187 9193 +0.1% 1.00x(?)
StringEqualPointerComparison 7296 7297 +0.0% 1.00x(?)
CaptureProp 4216 4209 -0.2% 1.00x(?)
PolymorphicCalls 22 22 +0.0% 1.00x
RC4 165 165 +0.0% 1.00x
ObjectiveCBridgeStubToNSStringRef 124 124 +0.0% 1.00x
Calculator 35 35 +0.0% 1.00x
MapReduce 342 342 +0.0% 1.00x
ObjectiveCBridgeStubDateMutation 273 273 +0.0% 1.00x
AngryPhonebook 2828 2829 +0.0% 1.00x(?)
IterateData 2518 2517 -0.0% 1.00x(?)
DictionaryLiteral 1267 1267 +0.0% 1.00x
Hanoi 3462 3462 +0.0% 1.00x
OpenClose 57 57 +0.0% 1.00x
DictionaryRemoveOfObjects 19344 19353 +0.1% 1.00x(?)
UTF8Decode 288 288 +0.0% 1.00x
SortStringsUnicode 8302 8302 +0.0% 1.00x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 127398 127982 +0.5% 1.00x(?)
SetIsSubsetOf 250 250 +0.0% 1.00x
Dictionary 727 727 +0.0% 1.00x
NopDeinit 38062 38071 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 75653 75748 +0.1% 1.00x(?)
ObjectiveCBridgeStubDataAppend 3361 3364 +0.1% 1.00x(?)
SetExclusiveOr 2915 2928 +0.5% 1.00x(?)
NSDictionaryCastToSwift 5011 5007 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 137710 137511 -0.1% 1.00x(?)
ObjectiveCBridgeStubNSDateRefAccess 308 308 +0.0% 1.00x
StrToInt 5296 5300 +0.1% 1.00x(?)
ArrayOfGenericRef 3626 3624 -0.1% 1.00x(?)
StringHasSuffix 830 830 +0.0% 1.00x
Phonebook 7579 7577 -0.0% 1.00x(?)
ObjectiveCBridgeStubDateAccess 182 182 +0.0% 1.00x
Sim2DArray 277 277 +0.0% 1.00x
SetExclusiveOr_OfObjects 7494 7491 -0.0% 1.00x(?)
ArrayAppendRepeatCol 643 643 +0.0% 1.00x
MonteCarloE 10595 10604 +0.1% 1.00x(?)
SetUnion_OfObjects 6339 6353 +0.2% 1.00x(?)
StringHasSuffixUnicode 63177 63187 +0.0% 1.00x(?)
HashTest 1752 1753 +0.1% 1.00x(?)
SetIsSubsetOf_OfObjects 307 307 +0.0% 1.00x
ArrayAppend 774 775 +0.1% 1.00x(?)
DictionaryRemove 2332 2332 +0.0% 1.00x
StringHasPrefixUnicode 13553 13542 -0.1% 1.00x(?)
LinkedList 7208 7210 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 100819 101281 +0.5% 1.00x(?)
RGBHistogramOfObjects 21508 21494 -0.1% 1.00x(?)
NSStringConversion 813 812 -0.1% 1.00x(?)
RGBHistogram 2231 2232 +0.0% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 4649 4649 +0.0% 1.00x
ArrayAppendSequence 1062 1062 +0.0% 1.00x
ArrayAppendArrayOfInt 599 599 +0.0% 1.00x
ArrayOfPOD 182 182 +0.0% 1.00x
SetUnion 2416 2422 +0.2% 1.00x(?)
Chars 631 631 +0.0% 1.00x
StringBuilder 1316 1313 -0.2% 1.00x(?)
ObserverForwarderStruct 933 933 +0.0% 1.00x
DeadArray 182 182 +0.0% 1.00x
ArrayValueProp2 6 6 +0.0% 1.00x
BitCount 1 1 +0.0% 1.00x
AnyHashableWithAClass 62158 62213 +0.1% 1.00x(?)
SevenBoom 1360 1362 +0.1% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 89788 89473 -0.3% 1.00x(?)
StringWalk 5913 5912 -0.0% 1.00x(?)
ArrayValueProp 6 6 +0.0% 1.00x
GlobalClass 0 0 +0.0% 1.00x
Memset 235 235 +0.0% 1.00x
Dictionary2OfObjects 3443 3428 -0.4% 1.00x(?)
ArrayValueProp4 6 6 +0.0% 1.00x
ObjectiveCBridgeStubNSDataAppend 2400 2404 +0.2% 1.00x(?)
ArrayValueProp3 6 6 +0.0% 1.00x
ObjectiveCBridgeStubFromNSDate 3595 3602 +0.2% 1.00x(?)
ObserverPartiallyAppliedMethod 3409 3393 -0.5% 1.00x(?)
SuperChars 212878 215108 +1.1% 0.99x(?)
ObjectiveCBridgeToNSArray 30085 30317 +0.8% 0.99x(?)
SetIntersect 364 368 +1.1% 0.99x(?)
TwoSum 1300 1314 +1.1% 0.99x(?)
ObjectiveCBridgeStubURLAppendPath 231697 235460 +1.6% 0.98x(?)
146 3090024 3142361 +1.7% 0.98x
ObjectiveCBridgeStubNSDateMutationRef 12333 12581 +2.0% 0.98x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 196518 203727 +3.7% 0.96x(?)
ObjectiveCBridgeStubToNSDate 12509 13221 +5.7% 0.95x(?)
StaticArray 2669 2795 +4.7% 0.95x(?)
**Unoptimized (Onone)**
Regression (0)
Improvement (0)
No Changes (147)
TEST OLD_MIN NEW_MIN DELTA (%) SPEEDUP
TypeFlood 178 174 -2.2% 1.02x(?)
OpenClose 470 462 -1.7% 1.02x(?)
ObjectiveCBridgeStubFromArrayOfNSString 59690 58495 -2.0% 1.02x(?)
StackPromo 129113 128255 -0.7% 1.01x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectForced 7854 7774 -1.0% 1.01x(?)
ObjectiveCBridgeFromNSArrayAnyObjectForced 10360 10243 -1.1% 1.01x(?)
StrComplexWalk 7632 7589 -0.6% 1.01x(?)
ArrayAppendOptionals 1295 1284 -0.8% 1.01x(?)
ObjectiveCBridgeFromNSSetAnyObject 90049 89382 -0.7% 1.01x(?)
ObjectiveCBridgeStubURLAppendPathRef 238366 235310 -1.3% 1.01x(?)
PopFrontArrayGeneric 9557 9447 -1.1% 1.01x(?)
ObjectiveCBridgeStubToNSStringRef 156 155 -0.6% 1.01x
ObjectiveCBridgeFromNSDictionaryAnyObjectToStringForced 135371 134390 -0.7% 1.01x(?)
LinkedList 27847 27556 -1.0% 1.01x(?)
NSStringConversion 3057 3014 -1.4% 1.01x(?)
ObjectiveCBridgeStubNSDataAppend 2746 2732 -0.5% 1.01x(?)
ArraySubscript 5632 5654 +0.4% 1.00x(?)
ObjectiveCBridgeToNSString 1104 1106 +0.2% 1.00x(?)
RecursiveOwnedParameter 10911 10918 +0.1% 1.00x(?)
Integrate 368 368 +0.0% 1.00x
ObjectiveCBridgeFromNSArrayAnyObjectToString 118299 117879 -0.4% 1.00x(?)
ClassArrayGetter 1266 1266 +0.0% 1.00x
Array2D 813995 813447 -0.1% 1.00x(?)
Histogram 10114 10132 +0.2% 1.00x(?)
SortStrings 2690 2688 -0.1% 1.00x(?)
DictionaryBridge 3751 3762 +0.3% 1.00x(?)
ObjectiveCBridgeStubFromNSDateRef 4067 4061 -0.1% 1.00x(?)
MonteCarloPi 53608 53587 -0.0% 1.00x(?)
StringWithCString 152994 152902 -0.1% 1.00x(?)
ObjectiveCBridgeFromNSStringForced 3051 3052 +0.0% 1.00x(?)
Prims 13232 13232 +0.0% 1.00x
SortLettersInPlace 2567 2567 +0.0% 1.00x
DictionarySwap 6012 6037 +0.4% 1.00x(?)
ObjectiveCBridgeFromNSString 5053 5069 +0.3% 1.00x(?)
PopFrontArray 24194 24217 +0.1% 1.00x(?)
Dictionary3OfObjects 2005 2006 +0.1% 1.00x(?)
RangeAssignment 13260 13307 +0.3% 1.00x(?)
ByteSwap 9 9 +0.0% 1.00x
SuperChars 263195 262302 -0.3% 1.00x(?)
ArrayAppendLazyMap 244951 244883 -0.0% 1.00x(?)
XorLoop 20000 20005 +0.0% 1.00x(?)
ArrayAppendReserved 3305 3304 -0.0% 1.00x(?)
ObserverClosure 6946 6928 -0.3% 1.00x(?)
ObjectiveCBridgeStubToNSString 1337 1334 -0.2% 1.00x(?)
ArrayAppendStrings 11857 11827 -0.2% 1.00x(?)
ErrorHandling 3816 3811 -0.1% 1.00x(?)
ObjectiveCBridgeStubFromNSStringRef 157 157 +0.0% 1.00x
ObjectiveCBridgeStubFromNSString 791 791 +0.0% 1.00x
ProtocolDispatch 6159 6153 -0.1% 1.00x(?)
ObjectAllocation 557 559 +0.4% 1.00x(?)
ArrayLiteral 1253 1250 -0.2% 1.00x(?)
ProtocolDispatch2 441 441 +0.0% 1.00x
Walsh 13196 13155 -0.3% 1.00x(?)
Dictionary3 1384 1383 -0.1% 1.00x(?)
Dictionary2 4066 4057 -0.2% 1.00x(?)
StringHasPrefix 1667 1670 +0.2% 1.00x(?)
SetIntersect_OfObjects 11914 11896 -0.1% 1.00x(?)
Join 1463 1460 -0.2% 1.00x(?)
ArrayOfRef 9112 9121 +0.1% 1.00x(?)
ObserverUnappliedMethod 8790 8772 -0.2% 1.00x(?)
ObjectiveCBridgeStubDateMutation 426 427 +0.2% 1.00x
ObjectiveCBridgeToNSArray 30676 30616 -0.2% 1.00x(?)
DictionaryOfObjects 4567 4569 +0.0% 1.00x(?)
ObjectiveCBridgeStubToNSDateRef 3324 3309 -0.5% 1.00x(?)
PopFrontUnsafePointer 258912 258848 -0.0% 1.00x(?)
StringEqualPointerComparison 9869 9874 +0.1% 1.00x(?)
CaptureProp 117633 117548 -0.1% 1.00x(?)
PolymorphicCalls 1132 1131 -0.1% 1.00x(?)
RC4 9385 9393 +0.1% 1.00x
Calculator 1016 1016 +0.0% 1.00x
MapReduce 45171 45174 +0.0% 1.00x(?)
AngryPhonebook 3105 3105 +0.0% 1.00x
IterateData 10650 10660 +0.1% 1.00x(?)
DictionaryLiteral 15751 15765 +0.1% 1.00x(?)
Hanoi 19278 19308 +0.2% 1.00x(?)
ArrayOfGenericPOD 3519 3518 -0.0% 1.00x(?)
DictionaryRemoveOfObjects 46571 46596 +0.1% 1.00x(?)
UTF8Decode 43401 43398 -0.0% 1.00x(?)
SortStringsUnicode 9129 9137 +0.1% 1.00x(?)
SetIsSubsetOf 2133 2132 -0.1% 1.00x(?)
Dictionary 1860 1858 -0.1% 1.00x(?)
NopDeinit 61084 61126 +0.1% 1.00x(?)
ObjectiveCBridgeStubToArrayOfNSString 29698 29627 -0.2% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObject 78293 78223 -0.1% 1.00x(?)
SetIntersect 13229 13249 +0.1% 1.00x
ObjectiveCBridgeStubDataAppend 3471 3471 +0.0% 1.00x
SetExclusiveOr 23755 23812 +0.2% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectToString 154767 154969 +0.1% 1.00x(?)
ObjectiveCBridgeStubNSDateRefAccess 1228 1228 +0.0% 1.00x
StrToInt 5784 5782 -0.0% 1.00x(?)
ArrayInClass 4023 4023 +0.0% 1.00x
ArrayOfGenericRef 10031 10039 +0.1% 1.00x(?)
StringHasSuffix 1764 1757 -0.4% 1.00x(?)
Phonebook 63412 63444 +0.1% 1.00x(?)
ObjectiveCBridgeStubDateAccess 1124 1125 +0.1% 1.00x(?)
Sim2DArray 14776 14787 +0.1% 1.00x(?)
SetExclusiveOr_OfObjects 40193 40212 +0.1% 1.00x(?)
ArrayAppendRepeatCol 214471 214617 +0.1% 1.00x(?)
ObjectiveCBridgeToNSDictionary 62797 62917 +0.2% 1.00x(?)
MonteCarloE 108221 108149 -0.1% 1.00x(?)
SetUnion_OfObjects 28234 28207 -0.1% 1.00x(?)
StringHasSuffixUnicode 64927 64915 -0.0% 1.00x(?)
HashTest 5249 5244 -0.1% 1.00x(?)
SetIsSubsetOf_OfObjects 1895 1895 +0.0% 1.00x
ArrayAppend 3551 3552 +0.0% 1.00x(?)
DictionaryRemove 16877 16845 -0.2% 1.00x(?)
StringHasPrefixUnicode 15715 15711 -0.0% 1.00x(?)
RGBHistogramOfObjects 89266 89258 -0.0% 1.00x(?)
RGBHistogram 40037 40140 +0.3% 1.00x(?)
ObjectiveCBridgeFromNSSetAnyObjectForced 7548 7558 +0.1% 1.00x(?)
ArrayAppendSequence 105041 104805 -0.2% 1.00x(?)
ArrayAppendArrayOfInt 641 641 +0.0% 1.00x
ArrayOfPOD 2450 2451 +0.0% 1.00x(?)
SetUnion 12181 12240 +0.5% 1.00x(?)
Chars 4985 4973 -0.2% 1.00x(?)
StringBuilder 2702 2703 +0.0% 1.00x(?)
ObserverForwarderStruct 5307 5331 +0.5% 1.00x(?)
146 6017225 6001662 -0.3% 1.00x
BitCount 97 97 +0.0% 1.00x
AnyHashableWithAClass 77790 77803 +0.0% 1.00x(?)
SevenBoom 1509 1516 +0.5% 1.00x(?)
ObjectiveCBridgeFromNSArrayAnyObjectToStringForced 91357 91228 -0.1% 1.00x(?)
ObjectiveCBridgeStubNSDateMutationRef 14607 14598 -0.1% 1.00x(?)
GlobalClass 0 0 +0.0% 1.00x
Memset 20956 20958 +0.0% 1.00x(?)
Dictionary2OfObjects 5925 5928 +0.1% 1.00x(?)
ArrayValueProp4 3042 3031 -0.4% 1.00x(?)
TwoSum 4926 4913 -0.3% 1.00x(?)
ArrayValueProp2 3172 3175 +0.1% 1.00x(?)
ArrayValueProp3 3091 3076 -0.5% 1.00x(?)
ObjectiveCBridgeStubFromNSDate 3721 3719 -0.1% 1.00x(?)
ObserverPartiallyAppliedMethod 8353 8325 -0.3% 1.00x(?)
DictionarySwapOfObjects 19181 19284 +0.5% 0.99x(?)
ObjectiveCBridgeFromNSDictionaryAnyObject 183766 185780 +1.1% 0.99x(?)
ObjectiveCBridgeStubToNSDate 13938 14077 +1.0% 0.99x(?)
StringInterpolation 15544 15691 +0.9% 0.99x(?)
StaticArray 35289 35557 +0.8% 0.99x(?)
DeadArray 120117 120911 +0.7% 0.99x(?)
StringWalk 23340 23471 +0.6% 0.99x(?)
ArrayValueProp 2632 2648 +0.6% 0.99x(?)
ObjectiveCBridgeFromNSDictionaryAnyObjectToString 213095 217469 +2.0% 0.98x(?)
ArrayAppendGenericStructs 1276 1299 +1.8% 0.98x(?)
ObjectiveCBridgeToNSSet 39856 40513 +1.6% 0.98x(?)
NSError 677 689 +1.8% 0.98x(?)
ObjectiveCBridgeStubURLAppendPath 231915 237367 +2.4% 0.98x(?)
NSDictionaryCastToSwift 6215 6324 +1.8% 0.98x(?)
ObjectiveCBridgeFromNSSetAnyObjectToStringForced 111195 114305 +2.8% 0.97x(?)
**Hardware Overview** Model Name: Mac mini Model Identifier: Macmini7,1 Processor Name: Intel Core i5 Processor Speed: 2.8 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 3 MB Memory: 16 GB

@gottesmm gottesmm merged commit 1eeba39 into swiftlang:master Dec 14, 2016
@gottesmm gottesmm deleted the mandatory_one_iteration branch December 14, 2016 12:13
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