[PATCH] D15597: [ValueTracking] Handle opaque types in isDereferenceableAndAlignedPointer.
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 17:02:07 PST 2015
reames added inline comments.
================
Comment at: lib/Analysis/ValueTracking.cpp:3302
@@ -3301,2 +3301,3 @@
- if (Offset.isNonNegative())
+ // Don't deal with opaque types - we don't know whether they're aligned or
+ // not.
----------------
mzolotukhin wrote:
> reames wrote:
> > Why are opaque types considered sized? If they're opaque and we don't yet have a body, how can they be sized? That seems like the root of the problem here.
> The type of `V` isn't sized and isn't opaque. However, the type of `BV` is opaque, and we don't check if it's sized.
>
> I could replace the new check with `isSized()`, that might be better.
The isSized check would be a lot more general.
I really wonder though if the isSized and isNonNegative checks shouldn't be pushed inside the two callees though.
http://reviews.llvm.org/D15597
More information about the llvm-commits
mailing list