[PATCH] D63304: Ignore Singletons in statement domains

Sameer AbuAsal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 10:31:18 PDT 2019


sabuasal added a comment.

In D63304#1543859 <https://reviews.llvm.org/D63304#1543859>, @sabuasal wrote:

> In D63304#1542864 <https://reviews.llvm.org/D63304#1542864>, @Meinersbur wrote:
>
> > Thanks for the patch. Do you happen to have performance, code size numbers?
> >
> > [suggestion] The algorithm for detecting non-looping basic sets is quite ISL-heavy. If the goal is to better handle loops such as
> >
> >   i = 0;
> >   do {
> >     Stmt(i)
> >   } while (++i <n)
> >
> >
> > did you think about recognizing them directly? 
> >  Another possibility would be to merge the singleton with the main loop. E.g. the loop above could be converted into
> >
> >   for (int i = 0; i < max(1,n); i+=1) 
> >     Stmt(i);
> >
>


You can detect this simple loop domain directly by using "is_singleton" but with nested loops you'll need to project out to find singletons in one dimension out of all the loop nest dimensions.

As for numbers, we observed code size saving of around 1 MB when compiling a version of android Q. SPEC show very little to  no performance changes.


Repository:
  rPLO Polly

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

https://reviews.llvm.org/D63304





More information about the llvm-commits mailing list