Discovered as part of the VLS type work (see D85128).
Details
Diff Detail
Event Timeline
llvm/lib/Analysis/InlineCost.cpp | ||
---|---|---|
857 | 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. |
llvm/lib/Analysis/InlineCost.cpp | ||
---|---|---|
857 |
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. |
llvm/lib/Analysis/InlineCost.cpp | ||
---|---|---|
857 | Reading the code, I think you could just replace the uses of getFixedSize() with getKnownMinSize() and get roughly the right behavior. The reason I don't want to put this off is that inlining is very important for optimizations; if we add a hack now, we're inevitably going to have to look at it again very soon, so I'd rather just get it done now. |
llvm/lib/Analysis/InlineCost.cpp | ||
---|---|---|
857 |
No worries, makes sense if it's as trivial as using getKnownMinSize instead |
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.