Fix CC_MODE pessimization in reorg.c
Eric Botcazou
ebotcazou@adacore.com
Fri Jan 16 18:05:00 GMT 2015
As exposed in https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01052.html the
conversion of the original cc0-based Visium port into a CC_MODE port went
smoothly and didn't affect the run time performance, except for a single but
notable case: the reorg.c pass cannot put an insn that clobbers the CC reg
into a conditional branch's delay slot if it comes from before the branch.
I guess this is negligible on most architectures with delay slots but not on
the Visium where it alone costs 3% on CoreMark.
The attached patch fixes the pessimization very selectively, using the same
trigger as the compare-elim pass, which means that only aarch64, mn10300, rx
and visium are potentially affected; now among them only visium has delay
slots so the patch actually affects visium only.
Tested on visium-elf. Any objections to me applying it now?
2015-01-16 Eric Botcazou <ebotcazou@adacore.com>
* reorg.c (fill_simple_delay_slots): If TARGET_FLAGS_REGNUM is valid,
implement a more precise life analysis for it during backward scan.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 2336 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150116/daedabca/attachment.bin>
More information about the Gcc-patches
mailing list