================
@@ -3156,6 +3157,20 @@ static void combineMetadata(Instruction *K, const
Instruction *J,
MDNode::getMergedCallsiteMetadata(KCallSite, JCallSite));
}
+ // Merge callee_type metadata.
+ if (!AAOnly) {
+ auto *JCalleeType = J->getMetadata(LLVMContext::MD_callee_type);
+ auto *KCalleeType = K->getMetadata(LLVMContext::MD_callee_type);
+ // Drop the callee_type metadata if either of the call instructions do not
+ // have it.
+ if (JCalleeType && KCalleeType) {
+ K->setMetadata(LLVMContext::MD_callee_type,
+ MDNode::getMergedCalleeTypeMetadata(
+ K->getContext(), KCalleeType, JCalleeType));
+ } else
+ K->setMetadata(LLVMContext::MD_callee_type, nullptr);
+ }
----------------
nikic wrote:
Can you please move the handling for this into the switch? The separate
handling after the switch is only necessary for special cases that don't drop
the metadata if one instruction doesn't have it.
https://github.com/llvm/llvm-project/pull/87573
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits