[PATCH] D78666: [llvm][NFC][CallSite] Remove CallSite from TypeMetadataUtils & related
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 22:14:49 PDT 2020
craig.topper added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:356
struct VirtualCallSite {
- Value *VTable;
- CallSite CS;
+ Value *VTable = nullptr;
+ CallBase &CB;
----------------
Why the "= nullptr"?
================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:470
std::vector<uint64_t> Args;
- auto *CI = dyn_cast<IntegerType>(CS.getType());
- if (!CI || CI->getBitWidth() > 64 || CS.arg_empty())
+ auto *CI = dyn_cast<IntegerType>(CB.getType());
+ if (!CI || CI->getBitWidth() > 64 || CB.arg_empty())
----------------
Can we rename this variable while you're here? I'm not sure what CI was meant to stand for. And its shadowed by another CI inside the loop.
================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1281
Args.push_back(IRB.CreateBitCast(VCallSite.VTable, Int8PtrTy));
- for (unsigned I = 0; I != CS.getNumArgOperands(); ++I)
- Args.push_back(CS.getArgOperand(I));
+ for (unsigned I = 0; I != CB.getNumArgOperands(); ++I)
+ Args.push_back(CB.getArgOperand(I));
----------------
Would Args.append(CB.arg_begin(), CB.arg_end()) work here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78666/new/
https://reviews.llvm.org/D78666
More information about the llvm-commits
mailing list