-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Implement a function signature cloner and rewriter. #1744
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
Conversation
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
@swift-ci Please test |
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
@swift-ci Please test Linux |
@swift-ci Please test |
@swift-ci Please test Linux |
8 similar comments
@swift-ci Please test Linux |
@swift-ci Please test Linux |
@swift-ci Please test Linux |
@swift-ci Please test Linux |
@swift-ci Please test Linux |
@swift-ci Please test Linux |
@swift-ci Please test Linux |
@swift-ci Please test Linux |
This split the function signature module pass into 2 functin passes. By doing so, this allows us to rewrite to using the FSO-optimized function prior to attempting inlining, but allow us to do a substantial amount of optimization on the current function before attempting to do FSO on that function. And also helps us to move to a model which module pass is NOT used unless necesary. I do not see regression nor improvement for on the performance test suite. functionsignopts.sil and functionsignopt_sroa.sil are modified because the mangler now takes into account of information in the projection tree.
@swift-ci Please test |
Implement a function signature cloner and rewriter.
This split the function signature module pass into 2 function passes.
By doing so, this allows us to rewrite to using the FSO-optimized function prior to optimization, e.g. inlining, but allow us to do a substantial amount of optimization on the current function before attempting to do FSO on that function.
And also helps us to move to a model which module pass is NOT used unless necessary.
With this change, we should be able to place signature cloner and rewriter anywhere in the pipeline and run any # of iterations.
Performance test suite: I do not see regression nor improvement for this change on the performance test suite.
Compilation time on StdLib:
Running Time Self (ms) Symbol Name
477.0ms 1.9% 14.0 (anonymous namespace)::GenericSpecializer::run()
424.0ms 1.7% 1.0 (anonymous namespace)::StackPromotion::run()
290.0ms 1.2% 60.0 (anonymous namespace)::SILMem2Reg::run()
275.0ms 1.1% 6.0 (anonymous namespace)::ABCOpt::run()
273.0ms 1.1% 4.0 (anonymous namespace)::SILCodeMotion::run()
151.0ms 0.6% 45.0 (anonymous namespace)::FunctionSignatureOptRewriter::run()
144.0ms 0.6% 14.0 (anonymous namespace)::DeadStoreElimination::run()
144.0ms 0.6% 28.0 (anonymous namespace)::SILSROA::run()
99.0ms 0.4% 1.0 (anonymous namespace)::FunctionSignatureOptCloner::run()
96.0ms 0.4% 0.0 (anonymous namespace)::ConstantPropagation::run()
91.0ms 0.3% 33.0 (anonymous namespace)::SILLowerAggregate::run()