[PATCH] D16425: [opaque pointer types] [NFC] isDereferenceable{, AndAligned}Pointer: take the accessed size (and alignment) as arguments.
Eduard Burtescu via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 17:47:02 PST 2016
eddyb added inline comments.
================
Comment at: lib/Transforms/IPO/ArgumentPromotion.cpp:432
@@ -430,3 +431,3 @@
/// arguments passed in.
-bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg,
+bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg, Type *ElemTy,
bool isByValOrInAlloca,
----------------
mjacob wrote:
> Can we pass the size instead of pointee type here?
Yes, but the method is local to this file and all the callers already have a type.
Passing a size means using `DL.getTypeStoreSize` at each call site, which is anti-DRY IMO.
http://reviews.llvm.org/D16425
More information about the llvm-commits
mailing list