aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-07-18 12:06:00 +0200
committerRichard Biener <rguenther@suse.de>2022-07-18 13:19:22 +0200
commitce92603fbe3b4870e0a38efee1ee766d62942065 (patch)
tree7c2e3509cfb309d40b67c8bdada115918c25e76f /gcc/tree-cfg.cc
parent06039e71f02e478280ed63a63cbf5e76f3897513 (diff)
downloadgcc-ce92603fbe3b4870e0a38efee1ee766d62942065.zip
gcc-ce92603fbe3b4870e0a38efee1ee766d62942065.tar.gz
gcc-ce92603fbe3b4870e0a38efee1ee766d62942065.tar.bz2
Improve common reduction vs builtin code generation in loop distribution
loop distribution currently cannot handle the situation when the last partition is a builtin but there's a common reduction in all partitions (like the final IV value). The following lifts this restriction by making the last non-builtin partition provide the definitions for the loop-closed PHI nodes. Since we have heuristics in place to avoid code generating builtins last writing a testcase is difficult (but I ran into a case with other pending patches that made the heuristic ineffective). What's remaining is the inability to preserve common reductions when all partitions could be builtins (in some cases final value replacement could come to the rescue here). * tree-loop-distribution.cc (copy_loop_before): Add the ability to replace the original LC PHI defs. (generate_loops_for_partition): Pass through a flag whether to redirect original LC PHI defs. (generate_code_for_partition): Likewise. (loop_distribution::distribute_loop): Compute the partition that should provide the LC PHI defs for common reductions and pass that down.
Diffstat (limited to 'gcc/tree-cfg.cc')
0 files changed, 0 insertions, 0 deletions