MisExpect diagnostics need to know if branch_weight metadata originates
from an llvm.expect intrinsic. Without that information, we check branch
weights multiple times in the case if ThinLTO + SampleProfiling, leading
to some inaccuracy in how we report MisExpect related diagnostics to
users.
This patch allows us to track that provenance by adding a new optional
field to the branch weight metadata type. Since we change the format of
MD_prof metadata in a fundamental way, we need to update code handling
branch weights in a number of places.
We also update the lang ref for branch weights to reflect the change.
Why not check it within verifyMisExpect, seems less error prone than requiring callers to check?