Skip to content

[DebugInfo]Generate call-site information in swift #79308

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
Feb 28, 2025

Conversation

rastogishubham
Copy link
Contributor

@rastogishubham rastogishubham commented Feb 12, 2025

This patch adds the frontend flag gen-callsite-info which adds support for emitting the flag llvm::DINode::FlagAllCallsDescribed when generating LLVM IR from the Swift compiler to get call-site information for swift source code.

This will help disambiguate merged functions produced by function deduplication in the linker.

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Source Compatibility

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@adrian-prantl
Copy link
Contributor

@rastogishubham How much bigger does the debug info for the stdlib get due to this change?

@adrian-prantl
Copy link
Contributor

IIUC, there is no smoke test command. The platform specific ones only exist for the full tests. Which in this case are probably more appropriate anyway.

@adrian-prantl
Copy link
Contributor

Looks like at least one test failure can be explained by swiftlang/llvm-project#10084.

@rastogishubham
Copy link
Contributor Author

@adrian-prantl The swift stdlib went from 28 MB to 30 MB

The debug info section went from 4,521,724 Bytes or about 4.5 MB to 5,196,259 Bytes or 5.2 MB, or a 15% increase

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@rastogishubham
Copy link
Contributor Author

@adrian-prantl The patch has been updated with an option -gen-callsite-info

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

This patch adds support for emitting the flag
llvm::DINode::FlagAllCallsDescribed when generating LLVM IR from the
Swift compiler to get call-site information for swift source code.
@rastogishubham
Copy link
Contributor Author

Forgot to update the test call-site-info.swift with the option change

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham rastogishubham merged commit 1d28b5c into swiftlang:main Feb 28, 2025
3 checks passed
@rastogishubham rastogishubham deleted the CallSiteSwift branch February 28, 2025 05:08
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