b1b737ed6c
Enable this in CS for PowerPC; disable it for all other machines. PowerPC has no remainder instruction; the back end uses division to compute remainder. If CS finds both a / b and a % b, then CS now rewrites a % b as a - b * (a / b) and computes a / b only once. This removes an extra division in the PowerPC code, so it saves both time and space. I have not considered whether to enable this optimization for other machines. It might be less useful in machines with a remainder instruction. Also, if a % b occurs before a / b, the EM code gets a DUP. PowerPC ncg handles this DUP well; other back ends might not. |
||
---|---|---|
.. | ||
build.lua | ||
descr.sed | ||
em22.descr | ||
em24.descr | ||
em44.descr | ||
i86.descr | ||
i386.descr | ||
m68k2.descr | ||
m68k4.descr | ||
m68020.descr | ||
pdp.descr | ||
powerpc.descr | ||
sparc.descr | ||
vax4.descr |