[PATCH] D70609: [DDG] Data Dependence Graph - Topological Sort
Bardia Mahjour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 11:29:26 PST 2019
bmahjour marked 3 inline comments as done.
bmahjour added a comment.
In D70609#1765480 <https://reviews.llvm.org/D70609#1765480>, @Meinersbur wrote:
> [suggestion] Could you add a test case with a reduction (not necessarily in this patch), such as
>
> double sum = 0;
> for (int i = 0; i < n; i+=1)
> sum+=A[i];
> return sum;
>
>
> I am interested in what happens in self-recursive phi dependencies that are not induction variables. Note that GVN LoadPRE and LICM register promotion can create those as well. Another interesting case would be a nested reduction:
>
> for (int j = 0; j < m; j+=1) {
> double sum = 0;
> for (int i = 0; i < n; i+=1)
> sum += A[i][j];
> B[j] = sum;
> }
>
>
> The motivation is that reductions usually are optimized differently than flow dependencies.
I'm planning to add more tests later. I have two more patches that would cause reordering in the LIT tests so I'm waiting for us to get those in before adding more maintenance. I've noted the reduction case and will add that to the list of tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70609/new/
https://reviews.llvm.org/D70609
More information about the llvm-commits
mailing list