[Bug rtl-optimization/68212] Loop unroller breaks basic block frequencies

pthaugen at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 2 22:17:34 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68212

pthaugen at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |guojiufu at gcc dot gnu.org,
                   |                            |pthaugen at gcc dot gnu.org

--- Comment #8 from pthaugen at gcc dot gnu.org ---
(In reply to Peter Bergner from comment #7)
> (In reply to Pat Haugen from comment #4)
> > Author: pthaugen
> > Date: Fri Oct 14 17:10:18 2016
> > New Revision: 241170
> > 
> > URL: https://gcc.gnu.org/viewcvs?rev=241170&root=gcc&view=rev
> > Log:
> > 	PR rtl-optimization/68212
> > 	* cfgloopmanip.c (duplicate_loop_to_header_edge): Use preheader edge
> > 	frequency when computing scale factor for peeled copies.
> > 	* loop-unroll.c (unroll_loop_runtime_iterations): Fix freq/count
> > 	values for switch/peel blocks/edges.
> 
> Repeating Martin's question.  Pat, is this PR fixed with your patch or is
> there more to do?

No, there are still problems. The patch noted fixed the count/probability for
the peeled switch/case blocks created before entering the unrolled loop. But
the counts for the loop header/exit blocks are still incorrect. The last
activity I know of concerning that problem was the patch by Jiufu Guo here:
https://gcc.gnu.org/pipermail/gcc-patches/2020-February/539594.html. Not sure
if he has any more input here.


More information about the Gcc-bugs mailing list