[compiler-rt] [llvm] [nsan] Emit calls to optimized functions (PR #98900)
Dmitriy Chestnykh via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 21:35:41 PDT 2024
================
@@ -493,6 +494,103 @@ class ValueToShadowMap {
DenseMap<Value *, Value *> Map;
};
+// Base class for handling some details of __nsan_* functions
+class NsanInstrumentationFunction {
+public:
+ virtual std::pair<FunctionCallee, int>
+ getCalleeAndNumArgsForMemoryOp(const uint64_t MemOpSize) const = 0;
+ virtual FunctionCallee getGeneralFunction() const = 0;
+ virtual ~NsanInstrumentationFunction() = default;
+};
+
+// Helper class for __nsan_copy_* family
----------------
chestnykh wrote:
Done. I use the second template argument to pass information about number of arguments of the functions represented by the instance
https://github.com/llvm/llvm-project/pull/98900
More information about the llvm-commits
mailing list