Extract a part of isDereferenceableAndAlignedPointer functionality to Value::getPointerDerferecnceableBytes. Currently it's a NFC, but in future I'm going to accumulate all the logic about value dereferenceability in this function similarly to Value::getPointerAlignment function (D16144).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM w/minor comment addressed.
include/llvm/IR/Value.h | ||
---|---|---|
507 ↗ | (On Diff #48937) | This part of the comment is unclear. Can you reword? |
lib/IR/Value.cpp | ||
522 ↗ | (On Diff #48937) | As a separate patch, I think it would make sense to just kill the CanBeNull bit entirely. The cases where we can not check for null are also ones isKnownNonNull can trivially return true for. |