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.
109 lines
2.8 KiB
Plaintext
109 lines
2.8 KiB
Plaintext
wordsize: 4
|
|
pointersize: 4
|
|
%%RA
|
|
general registers: 12
|
|
address registers: 0
|
|
floating point registers: 16
|
|
use general as pointer: yes
|
|
|
|
register score parameters:
|
|
local variable:
|
|
(3 cases)
|
|
general,general
|
|
(1 size)
|
|
default -> (2,1)
|
|
pointer,general
|
|
(1 size)
|
|
default -> (2,1)
|
|
float,float
|
|
(1 size)
|
|
default -> (2,1)
|
|
address of local variable:
|
|
(1 case)
|
|
general,general
|
|
(1 size)
|
|
default -> (-1,-1)
|
|
constant:
|
|
(1 sizes)
|
|
default -> (-1,-1)
|
|
double constant:
|
|
(1 size)
|
|
default -> (-1,-1)
|
|
address of global variable:
|
|
(1 size)
|
|
default -> (1,1)
|
|
address of procedure:
|
|
(1 size)
|
|
default -> (-1,-1)
|
|
|
|
opening cost parameters:
|
|
local variable:
|
|
(2 cases)
|
|
general
|
|
(1 size)
|
|
default -> (2,1)
|
|
pointer
|
|
(1 size)
|
|
default -> (2,1)
|
|
address of local variable:
|
|
(1 case)
|
|
general
|
|
(1 size)
|
|
default -> (-1,-1)
|
|
constant:
|
|
(1 size)
|
|
default -> (-1,-1)
|
|
double constant:
|
|
(1 size)
|
|
default -> (-1,-1)
|
|
address of global variable:
|
|
(1 size)
|
|
default -> (2,2)
|
|
address of procedure:
|
|
(1 size)
|
|
default -> (-1,-1)
|
|
|
|
register save costs:
|
|
(14 cases)
|
|
0 -> (0,0)
|
|
1 -> (0,0)
|
|
2 -> (0,0)
|
|
3 -> (0,0)
|
|
4 -> (0,0)
|
|
5 -> (0,0)
|
|
6 -> (0,0)
|
|
7 -> (0,0)
|
|
8 -> (0,0)
|
|
9 -> (0,0)
|
|
10 -> (0,0)
|
|
11 -> (0,0)
|
|
12 -> (0,0)
|
|
0 -> (0,0)
|
|
|
|
%%UD
|
|
access costs of global variables:
|
|
(1 size)
|
|
default -> (3,2)
|
|
access costs of local variables:
|
|
(1 size)
|
|
default -> (2,1)
|
|
%%SR
|
|
overflow harmful?: no
|
|
array bound harmful?: yes
|
|
reduce sli if shift count larger than: 0
|
|
%%CS
|
|
#include "em_mnem.h"
|
|
first time then space:
|
|
addressing modes: -1
|
|
-1
|
|
cheap operations: op_cuu op_ciu op_cui op_cii -1
|
|
op_cuu op_ciu op_cui op_cii -1
|
|
lexical tresholds: 1 1
|
|
indirection limit: 8
|
|
convert remainder to division?: no no
|
|
do not eliminate sli if index on shiftcounts: -1
|
|
-1
|
|
forbidden operators: -1 -1
|
|
%%SP
|
|
global stack pollution allowed?: yes
|