[PATCH] D57170: [opaque pointer types] Pass function types to CallInst creation.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 24 13:18:32 PST 2019
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Looks pretty good - thanks!
================
Comment at: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:203
} else {
- NewCS = CallInst::Create(NF, Args, OpBundles, "", Call);
+ NewCS = CallInst::Create(NF->getFunctionType(), NF, Args, OpBundles, "",
+ Call);
----------------
Worth having CallInst::Create overloads that take Functions and pulls out their function type rather than having to do it explicitly in the callers? Or is there not enough use/need for it, produces too many combinatorial overloads or the like?
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:575-576
/// pointers.
+ FunctionType *MsanMetadataPtrGetterFnTy;
Value *MsanMetadataPtrForLoadN, *MsanMetadataPtrForStoreN;
+ FunctionType *MsanMetadataPtrGetterFixedSizeFnTy;
----------------
This patch adds lots of *Ty variables - worth introducing some kind of named pair of Value* and Type* for situations like this? (maybe as a separate patch/cleanup)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57170/new/
https://reviews.llvm.org/D57170
More information about the llvm-commits
mailing list