Skip to content
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

llvm-kompile --profile-matching #1095

Merged
merged 4 commits into from
Jun 20, 2024
Merged

llvm-kompile --profile-matching #1095

merged 4 commits into from
Jun 20, 2024

Conversation

dwightguth
Copy link
Collaborator

We add a new flag to llvm-kompile which, when enabled, instruments the k_step function and the optimized step_<ordinal> functions with calls to a new translation unit, clock.cpp, which contains some very basic use of clock_gettime in order to determine how much time is being spent doing pattern matching in order to try to apply each rewrite step. The resulting file contains data about the ordinal of the rule that applied and the time it took to determine that that rule should apply. It emits this data on stderr in a tabular format that can be read easily by a computer. This information is useful in determining how to optimize pattern matching in cases where it is still not clear where time is being spent even after kompile -O3 --iterated-threshold 1 is passed. When the flag is not passed to the code generator, no instrumentation is emitted, meaning this is zero-overhead unless it is enabled.

@rv-jenkins rv-jenkins changed the base branch from master to develop June 17, 2024 21:44
@dwightguth dwightguth marked this pull request as ready for review June 18, 2024 17:41
Copy link
Collaborator

@theo25 theo25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

Copy link
Contributor

@Baltoli Baltoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment but otherwise looks good!

scripts/matching-profile/join-with-locations Outdated Show resolved Hide resolved
@dwightguth dwightguth merged commit ffb7b10 into develop Jun 20, 2024
10 checks passed
@dwightguth dwightguth deleted the profile-matching branch June 20, 2024 19:01
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