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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 13:22:57 PDT 2017

tejohnson added inline comments.

Comment at: docs/LangRef.rst:5210
+Branch weight metadata attached to a branch, switch or call instruction
+represents the likeliness of the associated branch being taken.
davidxl wrote:
> Does it attach to the call instruction?
> It can be attached to SELECT instruction which should be mentioned.
It attached to direct call instructions in SamplePGO mode. And according to the linked older documentation I found (http://llvm.org/docs/BranchWeightMetadata.html#indirectbrinst) it attaches to indirect calls, although I wonder if that is stale since we now have VP metadata for indirect calls?

Will add "select" to the list of instruction types here.

Comment at: docs/LangRef.rst:5220
+Function entry count metadata can be attached to function definitions
+to enable comparing different functions during inter-procedural analysis
+and optimization.
davidxl wrote:
> to record the number of times the function is called.  Used with BFI information, it is also used to derive basic block profile count.
will update.

Comment at: docs/LangRef.rst:5231
+value profile information. Currently this is indirect calls (where it
+records the hottest callees) and memcpy calls (where it records the
+hottest memcpy byte lengths).
davidxl wrote:
> memcpy -- mempy like calls (including memset, etc)
will change to "memory intrinsics such as memcpy, memmove and memset"


More information about the llvm-commits mailing list