-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/15/11 12:24, Tom de Vries wrote: > Richard, > > this patch fixes up the basic block frequencies after merging 2 bbs > in tail_merge_optimize, and prevents tree-dump messages like: > 'Invalid sum of incoming frequencies x, should be y'. > > Bootstrapped and reg-tested on x86_64 and i686, build and > reg-tested on ARM and MIPS. > > OK for trunk? > > Thanks, - Tom > > 2011-11-15 Tom de Vries <t...@codesourcery.com> > > * tree-ssa-tail-merge.c (replace_block_by): Add frequency of bb2 to > bb1. > > * gcc.dg/pr43864.c: Check for absence of 'Invalid sum' in pre > tree-dump. * gcc.dg/pr43864-2.c: Same. * gcc.dg/pr43864-3.c: Same. > * gcc.dg/pr43864-4.c: Same. Just to be safe, can you clamp bb's frequency at BB_FREQ_MAX. ie, after summing the frequencies
if (bb2->frequency > BB_FREQ_MAX) bb2->frequency = BB_FREQ_MAX; In theory this shouldn't happen, but often the frequencies go goofy. Approved with that fix. jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOwshbAAoJEBRtltQi2kC7JbcH/1EWDBcbyGnBPK9TiSYN9bUq jA9Unhw3cA6VChRL9B4LVI6IdHuukzCnyFHgKUYU0IwHWKEJFXK59JrQh5xxlXxd Xe4A+7ryNxoFatXPPzisovB5YUVgxQ+vq6J1kQcXl/Ty2c64706ufJ/3lvV1THL1 1lLtxXZs8qzTB0tLerQAcviyr4pV7/Wmj7NXsylR43ogHZIrjRG2BeQdiVeNNgJ5 tPvC8/ZVjycj21jvISUxKbAJgRIVBHCPAYKf3K7nHblwnThq7M+BGazvrQIsgCSu AjH7zDgrlD/x02dP/41UrxeGGtuMyefTpGVp5b7azzjni5/n/3xpwv/Ogv/Y97I= =zT+M -----END PGP SIGNATURE-----