Hi Nadav (and others who are related to this issue) - I saw some discussions on loop vectorizer that you are planning to write. Do you foresee using Polyhedral Framework (polly project) in some way in that. Thanks J. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121007/476abc1c/attachment.html>
Javed, I'd like to add that, mostly through Tobi's efforts, we were able to have isl (the integer set library) on which Polly depends relicensed such that it is now distributed under the MIT license, and thus Polly should be eligible for inclusion as some of LLVM's core analysis and transformation passes. -Hal ----- Original Message -----> From: "Javed Absar" <javed.absar at gmail.com> > To: llvmdev at cs.uiuc.edu > Sent: Sunday, October 7, 2012 10:50:07 AM > Subject: [LLVMdev] LLVM Loop Vectorizer (Nadav Rotem) > > > Hi Nadav (and others who are related to this issue) - > > > I saw some discussions on loop vectorizer that you are planning to > write. Do you foresee using Polyhedral Framework (polly project) in > some way in that. > > > Thanks > J. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory
> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On > Behalf Of Hal Finkel > Sent: Monday, October 08, 2012 1:35 AM > > I'd like to add that, mostly through Tobi's efforts, we were able to have isl (the > integer set library) on which Polly depends relicensed such that it is now > distributed under the MIT license, and thus Polly should be eligible for inclusion > as some of LLVM's core analysis and transformation passes.Yes, that will be very useful. One way to think of Polly is as a "gateway into the polyhedral model". The core functionality is to take a region and provide a polyhedral model for its memory accesses. This is separate from the fact that Polly also provides an optimization driver over a handful of different polyhedral implementations. Besides that, ISL, through Polly, provides a pretty good dependence analysis. There should be an abstract dependence API similar to AliasAnalysis, so that Polly can be used as an analysis option. Sameer.
Hi Javed, Developing a good loop vectorizer takes several years. The work on the GCC vectorizer began in 2004, and they spent several years improving and optimizing their vectorizer. They started by vectorizing simple loops, and added features that they needed in order to vectorize additional loops that were important for them. They started with a single-block loops, and later they added "if-conversion", support for reductions and induction variables, etc. This approach was effective because it allowed them to stay focused. It is important to stay focused on today's problems, but at the same time provide the right abstraction even for problems that we decide not to solve today. We've started discussing the details of exposing target information to IR-level passes because it will allow the loop vectorizer, as well as other optimizations, to do a better job. Once we finish the design of the "Target" interface, we need to start working on a general loop-vectorizer design. I think that any design that we choose must take Polly into consideration. But I don't think that we need to start with loops that require polyhedral optimizer. I think that we should start with the examples from the gcc vectorizer page[1]. Thanks, Nadav [1] - http://gcc.gnu.org/projects/tree-ssa/vectorization.html First, we need to check and see if Polly is the solution to the problems that we have. On Oct 7, 2012, at 8:50 AM, Javed Absar <javed.absar at gmail.com> wrote:> Hi Nadav (and others who are related to this issue) - > > I saw some discussions on loop vectorizer that you are planning to write. Do you foresee using Polyhedral Framework (polly project) in some way in that. > > Thanks > J.
On 10/08/2012 06:02 AM, Nadav Rotem wrote:> Hi Javed, > > Developing a good loop vectorizer takes several years. The work on the GCC vectorizer began in 2004, and they spent several years improving and optimizing their vectorizer. They started by vectorizing simple loops, and added features that they needed in order to vectorize additional loops that were important for them. They started with a single-block loops, and later they added "if-conversion", support for reductions and induction variables, etc. This approach was effective because it allowed them to stay focused. > > It is important to stay focused on today's problems, but at the same time provide the right abstraction even for problems that we decide not to solve today. We've started discussing the details of exposing target information to IR-level passes because it will allow the loop vectorizer, as well as other optimizations, to do a better job. Once we finish the design of the "Target" interface, we need to start working on a general loop-vectorizer design. I think that any design that we choose must take Polly into consideration. But I don't think that we need to start with loops that require polyhedral optimizer. I think that we should start with the examples from the gcc vectorizer page[1].Hi Nadav, Javad, yes, I think the path you are taking is great. The 'Target' interface was one of immediate problems for vectorization. Solving it will help any pass working in that area. Regarding the use of Polly as a loop vectorizer. Polly is definitely a tool that may help in the area of loop vectorization, but as Nadav said, its use must be carefully evaluated. I see Polly rather as a piece of a bigger picture, then the one and only solution to vectorization in LLVM. I think Pollys strengths are definitely in the area of loop transformations. In case we want to do outer loop vectorization, require interchange, strip-mining, ... to enable vectorization or want to create cleanup loops, Polly can be of great value. However, vectorization is also a lot of pattern matching on IR level. I am not sure if all this pattern matching really needs to be part of a polyhedral optimizer. My personal feeling is that we would be better of keeping this separate. Also, as Nadav pointed out, as a first step a vectorizer will probably focus on very simple loops. Polly can obviously also help to vectorize them, but Polly may or may not be too much overhead for such simple cases. I think Sebastian Pop actually tested Polly on the gcc vectorizer test cases. He might be on vacaction now, but it would be interesting to get his results. As the design of the vectorizer is a very hot topic, I was wondering if there will be a BoF session on the LLVM conference? Nadav, you have not proposed one by accident? Tobi