[llvm] [msan] Generalize handleIntrinsicByApplyingToShadow to allow alternative intrinsic for shadows (PR #124831)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 12:19:52 PST 2025


================
@@ -4164,8 +4168,9 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
   /// (tbl{1,2,3,4}).
   ///
   /// The origin is approximated using setOriginForNaryOp.
-  void handleIntrinsicByApplyingToShadow(IntrinsicInst &I,
-                                         unsigned int trailingVerbatimArgs) {
+  void handleIntrinsicByApplyingToShadow(
+      IntrinsicInst &I, unsigned int trailingVerbatimArgs,
+      std::optional<Intrinsic::ID> shadowIntrinsicID) {
----------------
fmayer wrote:

I don't think the optional buys us much. We can jsut pass in the `I.getInstrinsicID()` from the caller?

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


More information about the llvm-commits mailing list