[PATCH] D98169: [IR] Permit load/store/alloca for struct with the same scalable vectors.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 9 22:59:24 PST 2021
HsiangKai added inline comments.
================
Comment at: llvm/include/llvm/IR/DataLayout.h:630
public:
- uint64_t getSizeInBytes() const { return StructSize; }
+ uint64_t getSizeInBytes() const { return StructSize.getKnownMinValue(); }
----------------
david-arm wrote:
> This should also return a TypeSize to be consistent with getSizeInBits.
How about keep the interface as so.
In current implementation, the elements will be scalar or scalable. The uses of StructLayout::getSizeInBytes() will be compared with StructLayout::getElementOffset() usually. Keep the interface to return uint64_t should be fine.
I added a FIXME comment before the function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98169/new/
https://reviews.llvm.org/D98169
More information about the llvm-commits
mailing list