Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Why do you want to move this? It doesn't seem like an obvious place for this. Not saying no, just trying to understand the motivation.
include/llvm/IR/Value.h | ||
---|---|---|
501 ↗ | (On Diff #44748) | Documentation? |
I'm going to move isDereferenceableAndAligned stuff from ValueTracking to Loads as Hal suggested in D10920. This functionality uses getAlignment static function which is also used by computeKnownBits machinery.
Why to Value class instead of making it a public ValueTracking function? It queries inherent properties of a Value just like isDereferenceable/getDereferenceableBytes I've introduced in D16116. All the three functions must be placed somewhere together, however I don't have strong preference about Value class being this place.
Given this code sometimes gets the ABI alignment and sometimes gets the preferred alignment, I'm not really clear on what the predicate actually is. Unless you can write a clear bit of documentation which makes it obvious, I don't think this makes sense to promote to Value.
include/llvm/IR/Value.h | ||
---|---|---|
505 ↗ | (On Diff #44748) | It seems like this change might be based on something other than ToT. I can't find this function in IR/Value.h in ToT. Nor do I see it in the single listed dependency. |
include/llvm/IR/Value.h | ||
---|---|---|
501 ↗ | (On Diff #44748) | This change makes sense to me, but as Phlip says, the function needs documentation to be in a public header. |
LGTM w/very minor comment.
lib/IR/Value.cpp | ||
---|---|---|
543 ↗ | (On Diff #47201) | This ternary constant folds. |