[PATCH] D106741: [ASAN] NFC: Remove redundant variable
Enna1 via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 24 01:12:38 PDT 2021
Enna1 created this revision.
Enna1 added reviewers: vitalybuka, MTC, MaskRay.
Herald added a subscriber: hiraditya.
Enna1 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`StackAlignment` has only one use: `StackAlignment = std::max(StackAlignment, AI.getAlignment());` So it is redundant.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106741
Files:
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Index: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -932,7 +932,6 @@
SmallVector<AllocaInst *, 16> AllocaVec;
SmallVector<AllocaInst *, 16> StaticAllocasToMoveUp;
SmallVector<Instruction *, 8> RetVec;
- unsigned StackAlignment;
FunctionCallee AsanStackMallocFunc[kMaxAsanStackMallocSizeClass + 1],
AsanStackFreeFunc[kMaxAsanStackMallocSizeClass + 1];
@@ -964,7 +963,6 @@
: F(F), ASan(ASan), DIB(*F.getParent(), /*AllowUnresolved*/ false),
C(ASan.C), IntptrTy(ASan.IntptrTy),
IntptrPtrTy(PointerType::get(IntptrTy, 0)), Mapping(ASan.Mapping),
- StackAlignment(1 << Mapping.Scale),
PoisonStack(ClStack &&
!Triple(F.getParent()->getTargetTriple()).isAMDGPU()) {}
@@ -1088,7 +1086,6 @@
return;
}
- StackAlignment = std::max(StackAlignment, AI.getAlignment());
if (!AI.isStaticAlloca())
DynamicAllocaVec.push_back(&AI);
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106741.361418.patch
Type: text/x-patch
Size: 1145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210724/44112a08/attachment.bin>
More information about the llvm-commits
mailing list