Sorry for jumping from http://lists.llvm.org/pipermail/llvm-dev/2018-September/125853.html but this is relevant. Sorry for not responding to that sooner. I was thinking about a longer reply, and time flied too quickly.>But, as I said back then, before we do so, we need to understand >exactly where to put it. That will depend on what other passes will >actually use it and if we want it to be a utility class or an analysis >pass, or both. > >Have you compiled a list of passes that could benefit from such a move?Many loop optimizers (Transforms) can benefit from knowing whether the loop is legal to vectorize (or loop will vectorize). Distribution and fusion are clear examples. Vectorizer has a lot in common with unroll and jam, and we should definitely share a lot. Where to place these analyses is debatable, but my preference is having them under the Analysis tree since they are indeed analysis and in principle they shouldn't depend on Transform. I think we should start from a utility but should implement it in such a way to make it easy to convert to an analysis pass. Thanks, Hideki -----Original Message----- From: Renato Golin [mailto:renato.golin at linaro.org] Sent: Thursday, September 13, 2018 10:10 AM To: Saito, Hideki <hideki.saito at intel.com> Cc: Jonas Paulsson <paulsson at linux.vnet.ibm.com>; LLVM Dev <llvm-dev at lists.llvm.org>; Adam Nemet <anemet at apple.com>; Sanjay Patel <spatel at rotateright.com>; Ulrich Weigand <ulrich.weigand at de.ibm.com>; Zaks, Ayal <ayal.zaks at intel.com>; Caballero, Diego <diego.caballero at intel.com>; Florian Hahn <florian.hahn at arm.com> Subject: Re: Loop Distribution pass On Thu, 13 Sep 2018 at 18:03, Saito, Hideki <hideki.saito at intel.com> wrote:> In short, my preference is to make vectorizer's analysis more usable by other xforms than making more and more loop xforms happen inside LV.Agreed! I wasn't alluding to moving the analysis inside LV, just using it inside a V2V transform to find more options to vectorise. --renato
On Thu, 13 Sep 2018 at 17:33, Saito, Hideki <hideki.saito at intel.com> wrote:> Many loop optimizers (Transforms) can benefit from knowing whether the loop is legal to vectorize (or loop will vectorize). Distribution and fusion are clear examples. Vectorizer has a lot in common with unroll and jam, and we should definitely share a lot. Where to place these analyses is debatable, but my preference is having them under the Analysis tree since they are indeed analysis and in principle they shouldn't depend on Transform. I think we should start from a utility but should implement it in such a way to make it easy to convert to an analysis pass.Sure, I agree with you on that. I'm just curious as tho which concrete passes would benefit sooner. --renato
>I'm just curious as tho which concrete passes would benefit sooner.This all depends on those who are working on other loop xforms, since we currently don't have bandwidth to drive that kind of changes into other loop xforms. That's why when this line of questions pops up, I offer to work together. Short of that, the best we can proactively do is to make vectorizer analyses available outside of vectorizer (and easy to find). In some sense, this is a chicken-egg problem. Once VPlan-based LV becomes good enough shape and if this problem still remains, we could expand into working on vectorization enabling transformations, but I really hope there are others who can work in that area before us. Hideki -----Original Message----- From: Renato Golin [mailto:renato.golin at linaro.org] Sent: Thursday, September 13, 2018 11:27 AM To: Saito, Hideki <hideki.saito at intel.com> Cc: Jonas Paulsson <paulsson at linux.vnet.ibm.com>; LLVM Dev <llvm-dev at lists.llvm.org>; Adam Nemet <anemet at apple.com>; Sanjay Patel <spatel at rotateright.com>; Ulrich Weigand <ulrich.weigand at de.ibm.com>; Zaks, Ayal <ayal.zaks at intel.com>; Caballero, Diego <diego.caballero at intel.com>; Florian Hahn <florian.hahn at arm.com> Subject: Re: Loop Distribution pass On Thu, 13 Sep 2018 at 17:33, Saito, Hideki <hideki.saito at intel.com> wrote:> Many loop optimizers (Transforms) can benefit from knowing whether the loop is legal to vectorize (or loop will vectorize). Distribution and fusion are clear examples. Vectorizer has a lot in common with unroll and jam, and we should definitely share a lot. Where to place these analyses is debatable, but my preference is having them under the Analysis tree since they are indeed analysis and in principle they shouldn't depend on Transform. I think we should start from a utility but should implement it in such a way to make it easy to convert to an analysis pass.Sure, I agree with you on that. I'm just curious as tho which concrete passes would benefit sooner. --renato
Maybe Matching Threads
- Loop Distribution pass
- Loop Distribution pass
- RFC: [LV] any objections in moving isLegalMasked* check from Legal to CostModel? (Cleaning up LoopVectorizationLegality)
- Loop Distribution pass
- RFC: [LV] any objections in moving isLegalMasked* check from Legal to CostModel? (Cleaning up LoopVectorizationLegality)