[PATCH] D16425: [opaque pointer types] [NFC] isDereferenceable{, AndAligned}Pointer: take the accessed size (and alignment) as arguments.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 18:03:31 PST 2016
dblaikie added inline comments.
================
Comment at: include/llvm/Analysis/ValueTracking.h:244
@@ -244,1 +243,3 @@
+ bool isDereferenceablePointer(const Value *V, uint64_t Size,
+ const DataLayout &DL,
const Instruction *CtxI = nullptr,
----------------
Do we still need to pass the DataLyaout to these functions if they have the size & alignment?
================
Comment at: lib/Analysis/ValueTracking.cpp:3260
@@ +3259,3 @@
+ unsigned BaseAlign = DL.getABITypeAlignment(BaseType);
+ if (BaseAlign < Align)
+ BaseAlign = Align;
----------------
Where did this case come from?
================
Comment at: lib/Analysis/ValueTracking.cpp:3308
@@ -3307,3 +3302,1 @@
- if (Ty->isSized()) {
- APInt Offset(DL.getTypeStoreSizeInBits(VTy), 0);
----------------
Where'd this check go?
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1779
@@ -1778,3 +1778,3 @@
// isDereferenceablePointer -> deref attribute
- if (isDereferenceablePointer(DerivedPtr, DL)) {
+ if (isDereferenceablePointer(DerivedPtr, 1, DL)) {
if (Argument *A = dyn_cast<Argument>(DerivedPtr)) {
----------------
Why is it only '1', rather than 'Bytes' used below?
http://reviews.llvm.org/D16425
More information about the llvm-commits
mailing list