This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix RTL sharing bug in loop unswitching (PR rtl-optimization/52092)


Hi,

> It seems loop-iv.c happily creates shared RTL in lots of places,
> loop-unroll.c solves that by unsharing everything it adds, this is
> an attempt to do the same in unswitching to unshare everything iv_analyze
> came up with.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

I would suggest to move the unsharing to the point where it is clear that
the rtl will added, i.e.,

loop-unswitch.c:370
  nloop = unswitch_loop (loop, bbs[i], cond, cinsn);
->
  nloop = unswitch_loop (loop, bbs[i], copy_rtx_if_shared (cond), cinsn);

Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]