All of these are scoped allocations which remain dereferenceable during the lifetime of the callee.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/IR/Value.cpp | ||
---|---|---|
747 | Why is the check for a sized type necessary? For an unsized type there would be no dereferenceable bytes, but I don't think it's something that really affects canBeFreed itself? |
llvm/lib/IR/Value.cpp | ||
---|---|---|
747 | I don't know. It seemed like enough of a cornercase to preserve the conservative handling from elsewhere. I'm happy to remove it if you are confident doing so is correct. |
llvm/lib/IR/Value.cpp | ||
---|---|---|
747 | The check in the getPointerDereferenceableBytes() implementation is present because we're querying the actual type size there, which is going to assert for unsized types. I'm reasonably sure that we don't need the check here. |
LGTM
llvm/lib/IR/Value.cpp | ||
---|---|---|
745 | This is probably going to warn due to unused variable. hasPointeeInMemoryValueAttr() is the equivalent boolean query. |
This is probably going to warn due to unused variable. hasPointeeInMemoryValueAttr() is the equivalent boolean query.