[PATCH] D101706: [NFC] Use getParamByValType instead of pointee type
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 1 21:23:05 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG07a9df599367: [NFC] Use getParamByValType instead of pointee type (authored by aeubanks).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101706/new/
https://reviews.llvm.org/D101706
Files:
llvm/lib/Analysis/InlineCost.cpp
Index: llvm/lib/Analysis/InlineCost.cpp
===================================================================
--- llvm/lib/Analysis/InlineCost.cpp
+++ llvm/lib/Analysis/InlineCost.cpp
@@ -2444,7 +2444,7 @@
// We approximate the number of loads and stores needed by dividing the
// size of the byval type by the target's pointer size.
PointerType *PTy = cast<PointerType>(Call.getArgOperand(I)->getType());
- unsigned TypeSize = DL.getTypeSizeInBits(PTy->getElementType());
+ unsigned TypeSize = DL.getTypeSizeInBits(Call.getParamByValType(I));
unsigned AS = PTy->getAddressSpace();
unsigned PointerSize = DL.getPointerSizeInBits(AS);
// Ceiling division.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101706.342208.patch
Type: text/x-patch
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210502/3c6efa26/attachment.bin>
More information about the llvm-commits
mailing list