[PATCH] D140263: [NFC] Vastly simplifies TypeSize

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 08:57:10 PST 2023


sdesmalen added a comment.

The initial implementation was indeed too generic and complicated. It followed from discussions where we thought there might be value in keeping it generic so that we might extend it to more dimensions at some point. But given the complexity of adding even just one extra dimension, I don't see this happening any time soon (if ever). The refactor looks like a welcome improvement!



================
Comment at: llvm/include/llvm/Support/TypeSize.h:42
+/// to represent stack offsets.
+class StackOffset {
+  int64_t Fixed = 0;
----------------
gchatelet wrote:
> courbet wrote:
> > Given that this is not a template over its unit, I think the doc should explicitly mention that the unit is bytes.
> I've reworded. Let me know if it's better.
Seems fine to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140263/new/

https://reviews.llvm.org/D140263



More information about the llvm-commits mailing list