This patch adds a new kind of metadata that indicates the possible callees of indirect calls.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I don't like the term "targets", in part because that term is generally used to refer to the target architecture. How about "callees"?
docs/LangRef.rst | ||
---|---|---|
4883 ↗ | (On Diff #113462) | run-time -> runtime |
4883 ↗ | (On Diff #113462) | If `targets` metadata is attached to a call site, and any callee is not among the set of functions provided by the metadata, the behavior is undefined. |
docs/LangRef.rst | ||
---|---|---|
4883 ↗ | (On Diff #114220) | You can remove this statement entirely: "It indicates a known set of functions that a call or invoke instruction could possibly target at runtime." The next sentence says that same thing in a more precise way. |
4886 ↗ | (On Diff #114220) | You can remove this statement: "The compiler is free to optimize call sites under this assumption The freedom for the compiler to optimize is implied by the preceding sentence. If you feel that stating an example optimization helps make the intent clearer, then I think that's fine. Maybe phrase this as: The intent of this metadata is to facilitate optimizations such as indirect call promotion. |
LGTM
docs/LangRef.rst | ||
---|---|---|
4884 ↗ | (On Diff #114369) | indirect call promotion -> indirect-call promotion |