[PATCH] D111829: [Sanitizers] Replaced getMaxPointerSizeInBits with getPointerSizeInBits, which was causing failures for 32bit x86.
Kirill Stoimenov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 14 12:36:54 PDT 2021
kstoimenov created this revision.
Herald added a subscriber: hiraditya.
kstoimenov requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111829
Files:
llvm/lib/Analysis/StackSafetyAnalysis.cpp
Index: llvm/lib/Analysis/StackSafetyAnalysis.cpp
===================================================================
--- llvm/lib/Analysis/StackSafetyAnalysis.cpp
+++ llvm/lib/Analysis/StackSafetyAnalysis.cpp
@@ -154,7 +154,7 @@
ConstantRange getStaticAllocaSizeRange(const AllocaInst &AI) {
const DataLayout &DL = AI.getModule()->getDataLayout();
TypeSize TS = DL.getTypeAllocSize(AI.getAllocatedType());
- unsigned PointerSize = DL.getMaxPointerSizeInBits();
+ unsigned PointerSize = DL.getPointerSizeInBits();
// Fallback to empty range for alloca size.
ConstantRange R = ConstantRange::getEmpty(PointerSize);
if (TS.isScalable())
@@ -752,10 +752,8 @@
KV.second.Calls.clear();
}
- uint32_t PointerSize = Copy.begin()
- ->first->getParent()
- ->getDataLayout()
- .getMaxPointerSizeInBits();
+ uint32_t PointerSize =
+ Copy.begin()->first->getParent()->getDataLayout().getPointerSizeInBits();
StackSafetyDataFlowAnalysis<GlobalValue> SSDFA(PointerSize, std::move(Copy));
for (auto &F : SSDFA.run()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111829.379805.patch
Type: text/x-patch
Size: 1135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211014/b14d0ff4/attachment.bin>
More information about the llvm-commits
mailing list