[PATCH] D38474: Add support for multiple prof metadata on instructions.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 11:42:54 PDT 2017


yamauchi added a comment.

To give more context, the motivating issue for us is the block frequency propagation of irreducible loops under PGO.

We think that if we can annotate irreducible loop headers with (relative) frequency weights (based on PGO profiles), that could work.

That would need a new annotation type in the form of, either

(1) a new (sub)type of prof metadata,

OR

(2) a new metadata type (a new MD_xxx).

We aren't sure which would be better.

A rationale for (1) is that it can be considered as a type of "prof" annotation as it's based on profile data.

This patch assumes (1) because our current idea is to put the annotation on the terminator of a header block where there is likely a branch_weight prof metadata on it (hence the support for multiple prof metadata.)

Alternatively (2) would not need this patch.


https://reviews.llvm.org/D38474





More information about the llvm-commits mailing list