-
Notifications
You must be signed in to change notification settings - Fork 14.3k
InstProfiling: Give the name to profc_bias. NFC. #95587
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
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember who said this or if it still applies, but I've been told that these names can increase compile times. Can you test some that the build time of some moderately large module isn't regressed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to suggest a consideration. Let me speak my justifications.
Generally, this is just for instrumentation mode. So, we could consider how much compilation time would be impacted in instrumentation modes. Named Insts will have extra cost (ex. adding suffixes) when they (Insts) are copied or propagated in transformations. In contrast, Insts' users won't have any costs since using just refers to Insts. I haven't measured yet.
Re.
profc_bias
, I can justify. It will be merged to the single Inst with optimizations. (#95588)The named Value will help readability for looking into larger funcs.
Re.
profc_addr
, it is referred in two places with load/store, in one place with atomic rmw. (will become two places when TATAS is introduced) I guess it won't enhance readability so much, since the scope ofprofc_addr
is small. That said, I think it's good thing to mark key Values (Insts) named..An example from #95588, with optimized
With names;
W/o names;
Could we suppose it would justify the microcost for naming a few Insts per region?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you decide to leave out
profc_addr
, we might also want to leave outpgocount
since the scope is small and the instructions are fairly simple. I can understand wantingprofc_bias
since those instructions are less obvious.I just realized there are a few words on this naming in the programmer's manual. It doesn't have guidance on when and how to name these variables, which is unfortunate.
https://llvm.org/docs/ProgrammersManual.html#creating-and-inserting-new-instructions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried removing
pgocount
. It was too intrusive for tests.