PROBLEMS 4.7 KB

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