Skip to content

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

Merged
merged 1 commit into from
Mar 20, 2016
Merged

Implement a function signature cloner and rewriter. #1744

merged 1 commit into from
Mar 20, 2016

Conversation

trentxintong
Copy link
Contributor

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()

@trentxintong
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@trentxintong
Copy link
Contributor Author

@swift-ci Please test

@trentxintong
Copy link
Contributor Author

@swift-ci Please test

@trentxintong
Copy link
Contributor Author

@swift-ci Please test

1 similar comment
@trentxintong
Copy link
Contributor Author

@swift-ci Please test

@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

@trentxintong
Copy link
Contributor Author

@swift-ci Please test

@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

8 similar comments
@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

@trentxintong
Copy link
Contributor Author

@swift-ci Please test Linux

@trentxintong
Copy link
Contributor Author

@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.
@trentxintong
Copy link
Contributor Author

@swift-ci Please test

trentxintong added a commit that referenced this pull request Mar 20, 2016
Implement a function signature cloner and rewriter.
@trentxintong trentxintong merged commit e3ec070 into swiftlang:master Mar 20, 2016
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.

1 participant