ack/util/ego
George Koehler b1b737ed6c Optimize procedures that do both a / b and a % b.
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.
2018-03-05 13:32:06 -05:00
..
bo Add prototypes, void in util/ego/share 2017-11-15 17:19:56 -05:00
ca Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
cf Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
cj Add prototypes, void in util/ego/share 2017-11-15 17:19:56 -05:00
cs Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
descr Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
em_ego Don't use '-' in option string to getopt(). 2017-10-29 23:25:07 -04:00
ic Fix a whole lot more stray prototypes. 2016-11-24 21:47:40 +01:00
il Add prototypes, void in util/ego/share 2017-11-15 17:19:56 -05:00
lv Add prototypes, void in util/ego/share 2017-11-15 17:19:56 -05:00
ra Add prototypes, void in util/ego/share 2017-11-15 17:19:56 -05:00
share Fixes for compiling ego with -DTRACE 2018-03-01 13:19:38 -05:00
sp Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
sr Add prototypes, void in util/ego/share 2017-11-15 17:19:56 -05:00
ud Fixes for compiling ego with -DTRACE 2018-03-01 13:19:38 -05:00
Action Initial revision 1987-01-13 11:31:24 +00:00
build.lua Fixes for compiling ego with -DTRACE 2018-03-01 13:19:38 -05:00