Skip to content

[Instrumentor] A configurable instrumentation pass plugin #151551

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

weliveindetail
Copy link
Member

Pass plugins are a commonly requested extension for LLVM-based tools. Better support for these extensions benefits the LLVM ecosystem and might slow down the growth of the monorepo. We currently lack test coverage for pass plugins, because we only have example plugins (and no reference), but most bots don't build examples. As a result we also can't test cross-project integration. Features like parsing of plugin parameters in Clang remain broken and get no attention.

This draft adds a reference plugin in LLVM that we can test in subprojects. For illustration, it comes with tests for plugin parameters and pipeline entry-points.

weliveindetail and others added 4 commits July 31, 2025 15:16
Both internally and externally we instrument code all the time. Usually,
those are hand written traversals that look for some specific
instructions or program points and then provide information to a
runtime. Since the real difference is in the runtime, and the
instrumentation is basically always the same, people can use this
Instrumentor pass and configure it to their needs.

Initial implementation only instruments alloca instructions but shows
the setup, and configurability via a JSON file.
@weliveindetail
Copy link
Member Author

I guess we don't want another generic plugin like Bye? 👋 I integrated the Instrumentor pass from #119038

Copy link

github-actions bot commented Jul 31, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

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