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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 13:32:49 PDT 2017


davidxl 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.
----------------
tejohnson wrote:
> 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.
Need to document the direct call usage.  indirectbr is not for indirect call, but computed gotos. So may be expand branch into conditional branch or indirect branches?    Unconditional direct branch does not need this meta data.


https://reviews.llvm.org/D34218





More information about the llvm-commits mailing list