-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/08/11 03:42, Tom de Vries wrote: > Hi Richard, > > I have a patch for PR43864. The patch adds a gimple level duplicate block > cleanup. The patch has been bootstrapped and reg-tested on x86_64, and > reg-tested on ARM. The size impact on ARM for spec2000 is shown in the > following > table (%, lower is better). > > none pic > thumb1 thumb2 thumb1 thumb2 > spec2000 99.9 99.9 99.8 99.8 > > PR43864 is currently marked as a duplicate of PR20070, but I'm not sure that > the > optimizations proposed in PR20070 would fix this PR. > > The problem in this PR is that when compiling with -O2, the example below > should > only have one call to free. The original problem is formulated in terms of > -Os, > but currently we generate one call to free with -Os, although still not the > smallest code possible. I'll show here the -O2 case, since that's similar to > the > original PR. [ ... ]
FWIW, I've seen at least one paper which claims that extending value numbering redundancy elimination to handle blocks is effective at eliminating duplicates. Redundancy elimination for blocks turns into CFG manipulations. We want to do this early in the pipeline so that register numbering doesn't get in the way. I'm going to let you and Richi iterate, but wanted to chime in with my general support for detecting and eliminating blocks early in the pipeline (gimple). jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJN8mTsAAoJEBRtltQi2kC7UxMIAKqEprg9LUJS4QnUeXRKDx7h +tMBS1hPEZcmfxV9jo95oXb+1yiCIrI2CUou9PDO8E4i/Dv3x6kCF5vyfLBGx0ZI dS80HjTdvr2vUzxFQnChESvDYepyg2JE6pnlnOe4cwnuyFHWhPQG7L3e3lDaZkTa 224afwDNNUMmCGDE4emUpgV/evQ4dpiiY/dqAU1fu6ev8wQxfDpyGeZOTD+qC1XM DfpZumzHJpJfo2w/LMbSiBNci0HYxENjUheNixzHDLMSUO8AdStje6NBIJ96I3s7 p94WuwuP08B1wU5J0F4B1TiyAJxDOBbtApRwhpAOs9NImEDydmOXDLjIaPivXBY= =2J0r -----END PGP SIGNATURE-----