[PATCH] D85848: [InlineCost] Skip scalable vectors in visitAlloca

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 12:52:06 PDT 2020


c-rhodes added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:857
+  if (isa<ScalableVectorType>(I.getAllocatedType()))
+    return false;
+
----------------
efriedma wrote:
> This will refuse to inline any function with a scalable vector variable; that seems so conservative that it's likely to cause practical issues.  Please take the time to fix the code properly.
> This will refuse to inline any function with a scalable vector variable; that seems so conservative that it's likely to cause practical issues. Please take the time to fix the code properly.

Is that not better than crashing? As far as I can tell either `getFixedSize` will be called causing a crash or it's a dynamic alloca that wont be inlined anyway.

I know we want to support scalable vectors here but unless I'm missing something this seems like a worthwhile improvement for the time being.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85848



More information about the llvm-commits mailing list