on 2020/4/15 下午2:21, Richard Biener via Gcc-patches wrote: > On Wed, Apr 15, 2020 at 3:56 AM Jiufu Guo via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> Hi, >> >> As you may know, we have loop unroll pass in RTL which was introduced a few >> years ago, and works for a long time. Currently, this unroller is using the >> pseudos in the original body, and then the pseudos are written multiple >> times. >> >> It would be a good idea to create new pseudos for those duplicated >> instructions >> during loop unrolling. This would relax reg dependence, and then provide >> more >> freedom/opportunity for other optimizations, like scheduling, RA... > > I think there's a separate pass to do something like this, conveniently > placed after unrolling. -fweb, IIRC enabled by default for -funroll-loops > unless explicitly disabled. Related is regrename which is also enabled then. > > So where does your patch make a difference? Is the webizers dataflow analysis > maybe confused by backedges? >
Juofu can help to confirm, it looks we disabled them on rs6000 by default and don't enable them for unroll_only_small_loops but just enable for explicit unroll options. If it's proved that web can cover what we want here, one option sounds to bring it/them back even for unroll_only_small_loops? BR, Kewen