[llvm] 07d4680 - [NFC][msan] Remove unused parameter from getOriginPtrForVAArgument (#72687)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 17 11:30:28 PST 2023
Author: Vitaly Buka
Date: 2023-11-17T11:30:00-08:00
New Revision: 07d4680dc16b0e6b5cef640fcf959f3de1afd282
URL: https://github.com/llvm/llvm-project/commit/07d4680dc16b0e6b5cef640fcf959f3de1afd282
DIFF: https://github.com/llvm/llvm-project/commit/07d4680dc16b0e6b5cef640fcf959f3de1afd282.diff
LOG: [NFC][msan] Remove unused parameter from getOriginPtrForVAArgument (#72687)
Added:
Modified:
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index 1297e03b279e511..0cdb269a97b1395 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -4667,13 +4667,6 @@ struct VarArgHelperBase : public VarArgHelper {
return IRB.CreateAdd(Base, ConstantInt::get(MS.IntptrTy, ArgOffset));
}
- Value *getOriginPtrForVAArgument(IRBuilder<> &IRB, int ArgOffset) {
- Value *Base = IRB.CreatePointerCast(MS.VAArgOriginTLS, MS.IntptrTy);
- Base = IRB.CreateAdd(Base, ConstantInt::get(MS.IntptrTy, ArgOffset));
- return IRB.CreateIntToPtr(Base, PointerType::get(MS.OriginTy, 0),
- "_msarg_va_o");
- }
-
/// Compute the shadow address for a given va_arg.
Value *getShadowPtrForVAArgument(Type *Ty, IRBuilder<> &IRB,
unsigned ArgOffset, unsigned ArgSize) {
@@ -4687,7 +4680,7 @@ struct VarArgHelperBase : public VarArgHelper {
}
/// Compute the origin address for a given va_arg.
- Value *getOriginPtrForVAArgument(Type *Ty, IRBuilder<> &IRB, int ArgOffset) {
+ Value *getOriginPtrForVAArgument(IRBuilder<> &IRB, int ArgOffset) {
Value *Base = IRB.CreatePointerCast(MS.VAArgOriginTLS, MS.IntptrTy);
// getOriginPtrForVAArgument() is always called after
// getShadowPtrForVAArgument(), so __msan_va_arg_origin_tls can never
@@ -4793,7 +4786,7 @@ struct VarArgAMD64Helper : public VarArgHelperBase {
RealTy, IRB, OverflowOffset, alignTo(ArgSize, 8));
Value *OriginBase = nullptr;
if (MS.TrackOrigins)
- OriginBase = getOriginPtrForVAArgument(RealTy, IRB, OverflowOffset);
+ OriginBase = getOriginPtrForVAArgument(IRB, OverflowOffset);
OverflowOffset += alignTo(ArgSize, 8);
if (!ShadowBase)
continue;
@@ -4819,14 +4812,14 @@ struct VarArgAMD64Helper : public VarArgHelperBase {
ShadowBase =
getShadowPtrForVAArgument(A->getType(), IRB, GpOffset, 8);
if (MS.TrackOrigins)
- OriginBase = getOriginPtrForVAArgument(A->getType(), IRB, GpOffset);
+ OriginBase = getOriginPtrForVAArgument(IRB, GpOffset);
GpOffset += 8;
break;
case AK_FloatingPoint:
ShadowBase =
getShadowPtrForVAArgument(A->getType(), IRB, FpOffset, 16);
if (MS.TrackOrigins)
- OriginBase = getOriginPtrForVAArgument(A->getType(), IRB, FpOffset);
+ OriginBase = getOriginPtrForVAArgument(IRB, FpOffset);
FpOffset += 16;
break;
case AK_Memory:
@@ -4836,8 +4829,7 @@ struct VarArgAMD64Helper : public VarArgHelperBase {
ShadowBase =
getShadowPtrForVAArgument(A->getType(), IRB, OverflowOffset, 8);
if (MS.TrackOrigins)
- OriginBase =
- getOriginPtrForVAArgument(A->getType(), IRB, OverflowOffset);
+ OriginBase = getOriginPtrForVAArgument(IRB, OverflowOffset);
OverflowOffset += alignTo(ArgSize, 8);
}
// Take fixed arguments into account for GpOffset and FpOffset,
More information about the llvm-commits
mailing list