[llvm] [Asan] Add TTI hook to provide memory reference information of target intrinsic. (PR #133361)
Hank Chang via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 6 20:41:32 PDT 2025
HankChang736 wrote:
> Having two nearly identical functions for the target to implement is unacceptable. Find a way to combine the interface
Thanks for the feedback!
You're right — having two separate but nearly identical target interfaces is not ideal. What if try it with default argument?
```cpp
bool TargetTransformInfo::getTgtMemIntrinsic(IntrinsicInst *Inst,
MemIntrinsicInfo &Info,
SmallVectorImpl<unsigned> *Interesting = nullptr);
```
The `Interesting` vector is optional and only populated when needed.
Let me know if this direction looks better to you — happy to adjust further if needed.
https://github.com/llvm/llvm-project/pull/133361
More information about the llvm-commits
mailing list