[llvm-branch-commits] [llvm] [Local] preserve `MD_prof` in `hoistAllInstructionsInto` (PR #154635)

Mircea Trofin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 20 19:46:55 PDT 2025


================
@@ -498,6 +498,7 @@ LLVM_ABI void dropDebugUsers(Instruction &I);
 ///
 /// The moved instructions receive the insertion point debug location values
 /// (DILocations) and their debug intrinsic instructions are removed.
+/// Selects and indirect calls keep their MD_prof metadata.
----------------
mtrofin wrote:

I believe this is different from https://github.com/llvm/llvm-project/pull/152420#discussion_r2264594682 because this is less generic - there, it was about whether a caller asking to `dropUnknown...Metadata` would be surprised to get `MD_prof` still there. Here, I'd argue the API is specifically about hoisting, and it's more reasonable to keep around some metadata. @nikic 

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


More information about the llvm-branch-commits mailing list