-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[llvm][ctx_profile] Add the llvm.instrprof.callsite
intrinsic
#89939
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
Changes from all commits
848deea
622bba5
fca27fe
b7a042d
2a7dd97
a271f65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14139,6 +14139,41 @@ Semantics: | |
"""""""""" | ||
See description of '``llvm.instrprof.increment``' intrinsic. | ||
|
||
'``llvm.instrprof.callsite``' Intrinsic | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Syntax: | ||
""""""" | ||
|
||
:: | ||
|
||
declare void @llvm.instrprof.callsite(ptr <name>, i64 <hash>, | ||
i32 <num-counters>, | ||
i32 <index>, ptr <callsite>) | ||
|
||
Overview: | ||
""""""""" | ||
|
||
.. FIXME: detail when it's emitted once the support is added | ||
|
||
The '``llvm.instrprof.callsite``' intrinsic should be emitted before a callsite | ||
that's not to a "fake" callee (like another intrinsic or asm). | ||
|
||
Arguments: | ||
"""""""""" | ||
The first 4 arguments are similar to ``llvm.instrprof.increment``. The indexing | ||
is specific to callsites, meaning callsites are indexed from 0, independent from | ||
the indexes used by the other intrinsics (such as | ||
``llvm.instrprof.increment[.step]``). | ||
|
||
The last argument is the called value of the callsite this intrinsic precedes. | ||
|
||
Semantics: | ||
"""""""""" | ||
.. FIXME: detail how when the lowering pass is added. | ||
|
||
This is lowered by contextual profiling. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you expand this a bit to spell out how it is used (apart from just mentioning contextual profiling) like how it should be lowered, does it modify program behaviour, should it be treated as immovable by optimizations, when it should be ignored by backends and so on? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same, I will need to update after I land the lowering pass. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
||
'``llvm.instrprof.timestamp``' Intrinsic | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
|
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.
"should be emitted" -> can you specify under what modes this intrinsic is emitted (or is it always as this statement implies)?
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 will update this after I introduce the pass.
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.
Add a FIXME? Same for the other one.
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.
done.