[PATCH] D37354: Add !callees metadata

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 15:30:07 PDT 2017


hfinkel added inline comments.


================
Comment at: docs/LangRef.rst:4883
+known set of functions that a call or invoke instruction could possibly target
+at runtime. If ``callees`` metadata is attached to a call site, and any callee
+is not among the set of functions provided by the metadata, the behavior is
----------------
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.


================
Comment at: docs/LangRef.rst:4886
+undefined. The compiler is free to optimize call sites under this assumption
+(e.g., by performing indirect call promotion). For example, in the code below,
+the call instruction may only target the ``add`` or ``sub`` functions:
----------------
You can remove this statement: "The compiler is free to optimize call sites under this assumption
(e.g., by performing indirect call promotion)."

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.


https://reviews.llvm.org/D37354





More information about the llvm-commits mailing list