[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)
Mircea Trofin via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 11 07:42:37 PDT 2025
================
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef<unsigned> KnownIDs) {
// A DIAssignID attachment is debug metadata, don't drop it.
KnownSet.insert(LLVMContext::MD_DIAssignID);
+ if (!ProfcheckDisableMetadataFixes)
+ KnownSet.insert(LLVMContext::MD_prof);
----------------
mtrofin wrote:
I also have mixed feelings about this, I got worried we may accidentally keep the wrong profile info (meaning, uses should reason about what the right info is) - I'm curious what your reasoning was?
https://github.com/llvm/llvm-project/pull/152420
More information about the llvm-branch-commits
mailing list