[llvm] [RFC] Memory Model Relaxation Annotations (PR #78569)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 04:26:07 PDT 2024
================
@@ -132,7 +132,8 @@ struct ReplacementIRBuilder : IRBuilder<InstSimplifyFolder> {
explicit ReplacementIRBuilder(Instruction *I, const DataLayout &DL)
: IRBuilder(I->getContext(), DL) {
SetInsertPoint(I);
- this->CollectMetadataToCopy(I, {LLVMContext::MD_pcsections});
+ this->CollectMetadataToCopy(
+ I, {LLVMContext::MD_pcsections, LLVMContext::MD_mmra});
----------------
Pierre-vh wrote:
The pass is quite big, adding explicit copies will require some refactoring (to make sure all helpers can access the original MD).
I understand if the IRBuilder change needed is too much. Would it be fine if I create a custom inserter in this pass and let that handle adding MMRAs, so the logic is contained to the pass, or do you really prefer explicit copying everywhere?
https://github.com/llvm/llvm-project/pull/78569
More information about the llvm-commits
mailing list