[PATCH] D118947: [nfc] [hwasan] factor out logic to collect info about stack

Florian Mayer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 15:16:34 PST 2022


fmayer added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h:84
+  SmallVector<Instruction *, 4> UnrecognizedLifetimes;
+  DenseMap<AllocaInst *, std::vector<DbgVariableIntrinsic *>> AllocaDbgMap;
+  SmallVector<Instruction *, 8> RetVec;
----------------
eugenis wrote:
> This can be part of AllocaInfo (not necessarily in this change). We also do not need to collect these for uninteresting allocas I think.
Yes, that is the plan. But I want to keep this change as trivially NFC as possible.


================
Comment at: llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h:104
+  StackInfo Info;
+  StackInfoBuilderDelegate *Delegate;
+};
----------------
eugenis wrote:
> Can we just pass an std::function? This delegate stuff feels very heavy handed.
Makes sense, we can revisit the delegate if we get more than one callback and it gets messy like this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118947



More information about the llvm-commits mailing list