[PATCH] D48193: [LoopVectorizer] Use an interleave count of 1 when using a vector library call

Robert Lougher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 16:27:56 PDT 2018


rob.lougher added a comment.

In https://reviews.llvm.org/D48193#1133065, @hsaito wrote:

> I see this as a register allocator problem. It's not like we are running out of registers so that we cannot use ymm0 as a "scratch register" for SVML call. We should show the ASM code to CG experts and get the problem fixed there.
>
> Assuming that register allocator can fix simple enough issues..... I don't think it's correct to model this as a VECLIB call problem. It can happen to any function call that use too many registers that can't be shared among interleaved calls. Instead of looking at whether it's a VECLIB call or not, we should be checking how many registers are used for call/return, and how many of them cannot be shared among interleaved calls. We can then formulate this into a general register pressure issue.


The call uses one register but causes all other live values at the call location to be spilled (the other live values are caused by the interleaving).  To model this we would need to know the calling-convention of the target (which registers are preserved), and also which registers the live values will end up in.  This isn't known until after register allocation.


Repository:
  rL LLVM

https://reviews.llvm.org/D48193





More information about the llvm-commits mailing list