[Bug tree-optimization/98736] [10/11 Regression] Wrong partition order generated in loop distribution pass since r10-619-g5879ab5fafedc8f6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98736 Richard Biener changed: What|Removed |Added CC||zhendong.su at inf dot ethz.ch --- Comment #7 from Richard Biener --- *** Bug 99943 has been marked as a duplicate of this bug. ***
[Bug tree-optimization/98736] [10/11 Regression] Wrong partition order generated in loop distribution pass since r10-619-g5879ab5fafedc8f6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98736 --- Comment #6 from bin cheng --- Shall this be backported to 10/11 later? Thanks.
[Bug tree-optimization/98736] [10/11 Regression] Wrong partition order generated in loop distribution pass since r10-619-g5879ab5fafedc8f6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98736 --- Comment #5 from CVS Commits --- The master branch has been updated by Bin Cheng : https://gcc.gnu.org/g:e0bdccac582c01c928a05f26edcd8f5ac24669eb commit r11-8023-ge0bdccac582c01c928a05f26edcd8f5ac24669eb Author: Bin Cheng Date: Wed Apr 7 10:24:32 2021 +0800 tree-optimization/98736 - use programing order preserved RPO in ldist Tree loop distribution uses RPO to build reduced dependence graph, it's important that RPO preserves the original programing order. Though it usually does so, when distributing loop nest, exit BB can be placed before some loop BBs while after loop header. This patch fixes the issue by calling rev_post_order_and_mark_dfs_back_seme. gcc/ChangeLog: PR tree-optimization/98736 * tree-loop-distribution.c * (loop_distribution::bb_top_order_init): Compute RPO with programing order preserved by calling function rev_post_order_and_mark_dfs_back_seme. gcc/testsuite/ChangeLog: PR tree-optimization/98736 * gcc.c-torture/execute/pr98736.c: New test.
[Bug tree-optimization/98736] [10/11 Regression] Wrong partition order generated in loop distribution pass since r10-619-g5879ab5fafedc8f6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98736 --- Comment #4 from bin cheng --- (In reply to bin cheng from comment #3) > hmm, seems topological order isn't enough for distributing a loop nest, we > need topological order plus inner loop depth-first. Well, not really. In this case, problem is that rev-post order algorithm puts "a[c] = d[3];" before the inner loop which violates the original program order. Seems that it can be fixed by inner loop depth-first order wrto how we distribute inner loop, but I am not sure if this always preserves programming order because loop has been reformed by various optimizers.
[Bug tree-optimization/98736] [10/11 Regression] Wrong partition order generated in loop distribution pass since r10-619-g5879ab5fafedc8f6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98736 --- Comment #3 from bin cheng --- hmm, seems topological order isn't enough for distributing a loop nest, we need topological order plus inner loop depth-first.
[Bug tree-optimization/98736] [10/11 Regression] Wrong partition order generated in loop distribution pass since r10-619-g5879ab5fafedc8f6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98736 Martin Liška changed: What|Removed |Added Summary|[10/11 Regression] Wrong|[10/11 Regression] Wrong |partition order generated |partition order generated |in loop distribution pass |in loop distribution pass ||since ||r10-619-g5879ab5fafedc8f6 CC||marxin at gcc dot gnu.org --- Comment #2 from Martin Liška --- Started with r10-619-g5879ab5fafedc8f6 when -ftree-loop-distribute-patterns was enabled for -O2. However, adding -ftree-loop-distribute-patterns to -Os does not point to an older revision.