[PATCH] D62250: [DSE] Bugfix to avoid PartialStoreMerging involving non byte-sized stores
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 22 16:03:11 PDT 2019
efriedma added inline comments.
================
Comment at: llvm/include/llvm/IR/DataLayout.h:460
+ /// For example, returns false for i19 that has a 24-bit store size.
+ bool isTypeStoreSized(Type *Ty) const {
+ return getTypeSizeInBits(Ty) == getTypeStoreSizeInBits(Ty);
----------------
The name you have is a little too short to be clear, I think; if you want something along those lines, maybe typeSizeEqualsStoreSize().
A couple other alternatives: hasNonStructPadding(), to indicate the underlying property of the memory. Or maybe follow EVT naming and call it isByteSized(), since this is essentially the same computation on a Type* instead of an EVT.
You could probably make this a little faster since getTypeStoreSizeInBits itself calls getTypeSizeInBits, but I guess it's unlikely to matter much.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62250/new/
https://reviews.llvm.org/D62250
More information about the llvm-commits
mailing list