[llvm] [AMDGPU] Utilities to asan instrument memory instructions. (PR #98863)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 09:37:04 PDT 2024


================
@@ -320,13 +320,11 @@ void getInterestingMemoryOperands(
     }
     default:
       for (unsigned ArgNo = 0; ArgNo < CI->arg_size(); ArgNo++) {
-        Value *Arg = CI->getArgOperand(ArgNo);
-        if (Arg->getType()->isPointerTy()) {
-          Type *Ty = Arg->getType();
+        if (Type *Ty = CI->getParamByRefType(ArgNo)) {
           Interesting.emplace_back(I, ArgNo, false, Ty, Align(1));
         } else if (CI->isByValArgument(ArgNo)) {
-          Type *Ty = CI->getParamByValType(ArgNo);
-          Interesting.emplace_back(I, ArgNo, false, Ty, Align(1));
+          Type *ValTy = CI->getParamByValType(ArgNo);
----------------
arsenm wrote:

The byval and byref APIs should behave the same. If you can directly query getParamByRefType for one you should be able to for the other 

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


More information about the llvm-commits mailing list