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

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 08:38:33 PDT 2020


ctetreau added inline comments.
Herald added a reviewer: aartbik.


================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1059
+    llvm::Type *ElemTy = ArrayTy->getElementType();
+    bool ZeroInitializer = constant->isNullValue();
     llvm::Constant *OpValue, *PaddedOp;
----------------
I assume the reasoning here is that [-0.0f, ...] isn't the zero initialized value, but why make this change now? Seems unrelated.


================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1078
   }
+  // FIXME: Do we need to handle tail padding in vectors?
   return constant;
----------------
The fact that you have to ask this question tells me that you should probably just make this handle vectors.

You could add a templated helper function above this function that is basically just the original body of the SequentialType branch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75661





More information about the llvm-commits mailing list