[PATCH] D75661: Remove SequentialType from the type heirarchy.

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 19 15:54:34 PDT 2020


sdesmalen accepted this revision.
sdesmalen added a comment.
This revision is now accepted and ready to land.

Thank you for this patch! Personally I find the code more readable without the SequentialType abstraction and the use of the GEP interface (getTypeAtIndex(Type, Idx)) you added in D75660 <https://reviews.llvm.org/D75660>.
Like @nhaehnle I don't know whether this patch needs some more eyes before you commit this, but it looks good to me!



================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:442
+}
+static uint64_t GetSRASequentialNumElements(Type *T) {
+  if (ArrayType *AT = cast<ArrayType>(T))
----------------
nit: With only two uses, I'm not sure these functions make the code much more readable than just expanding it in their uses below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75661





More information about the cfe-commits mailing list