386BSD 0.0 development
[unix-history] / usr / src / usr.bin / gcc / cc1 / PROBLEMS
CommitLineData
847c8726
WJ
13. When find_reloads is used to count number of spills needed
2it does not take into account the fact that a reload may
3turn out to be a dummy.
4
5I'm not sure this really happens any more. Doesn't it find
6all the dummies on both passes?
7
810. movl a3@,a0
9 movl a3@(16),a1
10 clrb a0@(a1:l)
11is generated and may be worse than
12 movl a3@,a0
13 addl a3@(16),a0
14 clrb a0@
15If ordering of operands is improved, many more
16such cases will be generated from typical array accesses.
17
1823. (memory >> 24) and (memory >> 24) == CONST optimizations
19ought to be done machine independently.
20
2138. Hack expand_mult so that if there is no same-modes multiply
22it will use a widening multiply and then truncate rather than
23calling the library.
24
2539. Hack expanding of division to notice cases for
26long -> short division.
27
2840. Represent divide insns as (DIV:SI ...) followed by
29a separate lowpart extract. Represent remainder insns as DIV:SI
30followed by a separate highpart extract. Then cse can work on
31the DIV:SI part. Problem is, this may not be desirable on machines
32where computing the quotient alone does not necessarily give
33a remainder--such as the 68020 for long operands.
34
3542. In subst in combine.c at line 704 or so, a reg that really
36wants an areg gets a dreg. It is i*4, for indexing. Why?
37
3852. Reloading can look at how reload_contents got set up.
39If it was copied from a register, just reload from that register.
40Otherwise, perhaps can change the previous insn to move the
41data via the reload reg, thus avoiding one memory ref.
42
4353. Know that certain library routines do not clobber memory.
44
4563. Potential problem in cc_status.value2, if it ever activates itself
46after a two-address subtraction (which currently cannot happen).
47It is supposed to compare the current value of the destination
48but eliminating it would use the results of the subtraction, equivalent
49to comparing the previous value of the destination.
50
5165. Should loops that neither start nor end with a break
52be rearranged to end with the last break?
53
5469. Define the floating point converting arithmetic instructions
55for the 68881.
56
5774. Combine loop opt with cse opt in one pass. Do cse on each loop,
58then loop opt on that loop, and go from innermost loops outward.
59Make loop invariants available for cse at end of loop.
60
6185. pea can force a value to be reloaded into an areg
62which can make it worse than separate adding and pushing.
63This can only happen for adding something within addql range
64and it only loses if the qty becomes dead at that point
65so it can be added to with no copying.
66
6793. If a pseudo doesn't get a hard reg everywhere,
68can it get one during a loop?
69
7095. Can simplify shift of result of a bfextu. See testunsfld.c.
71Likewise and of result of a bfextu. See hyph.c.
72
7396. Can do SImode bitfield insns without reloading, but must
74alter the operands in special ways.
75
7699. final could check loop-entry branches to see if they
77screw up deletion of a test instruction. If they do,
78can put another test instruction before the branch and
79make it conditional and redirect it.
80
81106. Aliasing may be impossible if data types of refs differ
82and data type of containing objects also differ.
83(But check this wrt unions.)
84
85108. Can speed up flow analysis by making a table saying which
86register is set and which registers are used by each instruction that
87only sets one register and only uses two. This way avoid the tree
88walk for such instructions (most instructions).
89
90109. It is desirable to avoid converting INDEX to SImode if a
91narrower mode suffices, as HImode does on the 68000.
92How can this be done?
93
94110. Possible special combination pattern:
95If the two operands to a comparison die there and both come from insns
96that are identical except for replacing one operand with the other,
97throw away those insns. Ok if insns being discarded are known 1 to 1.
98An andl #1 after a seq is 1 to 1, but how should compiler know that?
99
100112. Can convert float to unsigned int by subtracting a constant,
101converting to signed int, and changing the sign bit.
102
103117. Any number of slow zero-extensions in one loop, that have
104their clr insns moved out of the loop, can share one register
105if their original life spans are disjoint.
106But it may be hard to be sure of this since
107the life span data that regscan produces may be hard to interpret
108validly or may be incorrect after cse.
109
110118. In cse, when a bfext insn refers to a register, if the field
111corresponds to a halfword or a byte and the register is equivalent
112to a memory location, it would be possible to detect this and
113replace it with a simple memory reference.
114
115121. Insns that store two values cannot be moved out of loops.
116The code in scan_loop doesn't even try to deal with them.
117
118122. When insn-output.c turns a bit-test into a sign-test,
119it should see whether the cc is already set up with that sign.
120
121123. When a conditional expression is used as a function arg, it would
122be faster (and in some cases shorter) to push each alternative rather
123than compute in a register and push that. This would require
124being able to specify "push this" as a target for expand_expr.
125
126124. On the 386, bad code results from foo (bar ()) when bar
127returns a double, because the pseudo used fails to get preferenced
128into an fp reg because of the distinction between regs 8 and 9.