ack/util/ego/cs
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
..
cs.c Add prototypes, void in util/ego/share 2017-11-15 17:19:56 -05:00
cs.h Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
cs_alloc.c Use size_t and void with memory allocation in ego. 2017-11-14 20:35:18 -05:00
cs_alloc.h Fix my typo from commit 5bbbaf4. 2017-11-17 15:46:24 -05:00
cs_aux.c Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_aux.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_avail.c Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
cs_avail.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_debug.c Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_debug.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_elim.c Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
cs_elim.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_entity.c Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_entity.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_getent.c Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_getent.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_kill.c Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_kill.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_partit.c Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
cs_partit.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_profit.c Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
cs_profit.h Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
cs_stack.c Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_stack.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00
cs_vnm.c Optimize procedures that do both a / b and a % b. 2018-03-05 13:32:06 -05:00
cs_vnm.h Use prototypes in ego/cs, ego/sp. 2018-02-05 16:09:30 -05:00