[PATCH] D76720: [Transforms][SROA] Promote allocas with mem2reg for scalable types

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 10:55:37 PDT 2020


c-rhodes marked 3 inline comments as done.
c-rhodes added a comment.

Thanks for the comments @ctetreau! I've updated the patch.



================
Comment at: llvm/include/llvm/IR/Type.h:233
+  /// True if this an instance of VectorType with the scalable property set.
+  bool isScalableVectorTy() const;
+
----------------
ctetreau wrote:
> Personally, I think functions like this are a code smell. Why have a type hierarchy at all if we're just going to do everything through the base type?
> 
> However, given the fact that the VectorType hierarchy is going to become more complicated soon, I'd really prefer that this function not be added. I'll propose alternatives inline below, but if you want this function, I'd prefer that:
> 
> 1) be a static function in SROA.cpp.
> 2) be implemented in terms of isa<VectorType> instead of isVectorTy.
Thanks for the suggestion, I've removed this. I don't think it's particularly useful as a function in SROA given it isn't (and is unlikely) to be used a great deal.


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

https://reviews.llvm.org/D76720





More information about the llvm-commits mailing list