[llvm-branch-commits] [llvm][IR] Extend BranchWeightMetadata to track provenance of weights (PR #86609)

David Li via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Apr 5 08:52:02 PDT 2024


================
@@ -1210,12 +1210,22 @@ Instruction *Instruction::cloneImpl() const {
 
 void Instruction::swapProfMetadata() {
   MDNode *ProfileData = getBranchWeightMDNode(*this);
-  if (!ProfileData || ProfileData->getNumOperands() != 3)
+  if (!isBranchWeightMD(ProfileData))
----------------
david-xl wrote:

Extract this and other similar refactoring change into a different patch?

https://github.com/llvm/llvm-project/pull/86609


More information about the llvm-branch-commits mailing list