Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MemProf][NFC] remove unneeded sized memory access callback #79260

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

Enna1
Copy link
Contributor

@Enna1 Enna1 commented Jan 24, 2024

As discussed in #79244, the sized memory access callback is leftover stuff carried over from Asan, can removed from the instrumentation.

@llvmbot
Copy link
Collaborator

llvmbot commented Jan 24, 2024

@llvm/pr-subscribers-llvm-transforms

Author: Enna1 (Enna1)

Changes

As discussed in #79244, the sized memory access callback is leftover stuff carried over from Asan, can removed from the instrumentation.


Full diff: https://github.com/llvm/llvm-project/pull/79260.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Instrumentation/MemProfiler.cpp (-6)
diff --git a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
index 2236e9cd44c5049..f7dbe763a59f55f 100644
--- a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
@@ -215,7 +215,6 @@ class MemProfiler {
 
   // These arrays is indexed by AccessIsWrite
   FunctionCallee MemProfMemoryAccessCallback[2];
-  FunctionCallee MemProfMemoryAccessCallbackSized[2];
 
   FunctionCallee MemProfMemmove, MemProfMemcpy, MemProfMemset;
   Value *DynamicShadowOffset = nullptr;
@@ -508,12 +507,7 @@ void MemProfiler::initializeCallbacks(Module &M) {
   for (size_t AccessIsWrite = 0; AccessIsWrite <= 1; AccessIsWrite++) {
     const std::string TypeStr = AccessIsWrite ? "store" : "load";
 
-    SmallVector<Type *, 3> Args2 = {IntptrTy, IntptrTy};
     SmallVector<Type *, 2> Args1{1, IntptrTy};
-    MemProfMemoryAccessCallbackSized[AccessIsWrite] =
-        M.getOrInsertFunction(ClMemoryAccessCallbackPrefix + TypeStr + "N",
-                              FunctionType::get(IRB.getVoidTy(), Args2, false));
-
     MemProfMemoryAccessCallback[AccessIsWrite] =
         M.getOrInsertFunction(ClMemoryAccessCallbackPrefix + TypeStr,
                               FunctionType::get(IRB.getVoidTy(), Args1, false));

@Enna1
Copy link
Contributor Author

Enna1 commented Jan 25, 2024

Thanks for the review!

As discussed in #79244,
the sized memory access callback is leftover stuff carried over from Asan,
can removed from the instrumentation.
@Enna1 Enna1 force-pushed the users/Enna1/memprof-remove-sizedcallback branch from b1824f8 to b9f7dc2 Compare January 25, 2024 00:23
@Enna1 Enna1 merged commit f8262ca into main Jan 25, 2024
3 of 4 checks passed
@Enna1 Enna1 deleted the users/Enna1/memprof-remove-sizedcallback branch January 25, 2024 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants