[PATCH] D34218: [Doc] Document prof metadata in LangRef

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 14:59:42 PDT 2017


reames added a comment.

Thank you for acting on this quickly.  Comments inline, but nothing here should prevent this landing.  We can iterate on the documentation once there's *something* in place.



================
Comment at: docs/BranchWeightMetadata.rst:70
+
+In SamplePGO mode, direct calls only have branch weight metadata,
+containing the execution count of the call.
----------------
Please describe the semantics of the metadata separately from the usage.  I have an alternate profiling source and need to know how the metadata is used, not just where you assume it comes from.


================
Comment at: docs/LangRef.rst:5237
+is executed, followed by uint64_t value and execution count pairs.
+The value profiling kind is 0 for indirect call targets and 1 for memory
+operations. For indirect call targets, each profile value is a hash
----------------
It would have been more clear to represent the types as strings in the metadata.  Document what's there for the moment, but might be worth changing this.

Clarification: Is it legal for the sum of the pairs to not add up to the total?  (It should be.)

Clarification: Is it *required* that the counts be exact executio counts?  Or are they solely relative weightings?  (Should be the later.)


https://reviews.llvm.org/D34218





More information about the llvm-commits mailing list