[PATCH] D88409: [SVE] Make ElementCount and TypeSize use a new PolySize class
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 06:17:13 PDT 2020
ctetreau added inline comments.
================
Comment at: llvm/include/llvm/Support/TypeSize.h:38
+public:
+ PolySize() = default;
----------------
david-arm wrote:
> ctetreau wrote:
> > Why does there need to be a default constructor?
> I think because there are places in the code base that rely upon it - this isn't something new as it was already in ElementCount. I think there is one example in llvm/include/llvm/IR/Intrinsics.h where the ElementCount is a member of a union. I'm pretty sure that removing the default constructor causes compilation errors, but I can try again to make sure.
Assuming it's necessary to have this constructor, what should it do? Should it explicitly be defined to be {0, false}? Is it a garbage value?
I suppose {0, false} sort of is already a garbage value, so maybe everything can just assert that it's not this?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88409/new/
https://reviews.llvm.org/D88409
More information about the llvm-commits
mailing list