Jan Hubicka - Loop construction versus 0 frequency (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

Hi, while looking into some dumps I noticed that loop construction code makes interesting decisions when frequencies are 0. This patch fix the problem. The patch really just reindents and adds if (max_freq) guard for the whole profile driven code block.

Bootstrapped/regtested i686-linux, will commit it shortly.

Honza

* cfgloop.c (canonicalize_loop_headers): When frequencies are zero,
do not attempt to use them.

Index: cfgloop.c

--- cfgloop.c (revision 121572) +++ cfgloop.c (working copy) @@ -402,30 +404,33 @@ canonicalize_loop_headers (void) if (LATCH_EDGE (e) && EDGE_FREQUENCY (e) > max_freq) max_freq = EDGE_FREQUENCY (e);


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