[PATCH] D130885: [AtomicExpandPass] Always copy pcsections Metadata to expanded atomics

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 07:10:28 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:130-133
+  // Preserves the DebugLoc from I, and preserves still valid metadata.
+  explicit ReplacementIRBuilder(Instruction *I) : IRBuilder<>(I) {
+    this->CollectMetadataToCopy(I, {LLVMContext::MD_pcsections});
+  }
----------------
This seems too specific. Why do we need a new IRBuilder subclass just for this? Isn't there already an existing helper for metadata? We could also preserve a lot more metadata, like any aliasing info


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130885/new/

https://reviews.llvm.org/D130885



More information about the llvm-commits mailing list