1. 13 Sep, 2007 1 commit
    • Ben.Lippmeier@anu.edu.au's avatar
      Better calculation of spill costs / selection of spill candidates. · 220a12e9
      Ben.Lippmeier@anu.edu.au authored
      Use Chaitin's formula for calculation of spill costs.
        Cost to spill some vreg = (num writes + num reads) / degree of node
      
      With 2 extra provisos:
        1) Don't spill vregs that live for only 1 instruction.
        2) Always prefer to spill vregs that live for a number of instructions
             more than 10 times the number of vregs in that class.
      
      Proviso 2 is there to help deal with basic blocks containing very long
      live ranges - SHA1 has live ranges > 1700 instructions. We don't ever
      try to keep these long lived ranges in regs at the expense of others.
      
      Because stack slots are allocated from a global pool, and there is no
      slot coalescing yet, without this condition the allocation of SHA1 dosn't
      converge fast enough and eventually runs out of stack slots.
      
      Prior to this patch we were just choosing to spill the range with the
      longest lifetime, so we didn't bump into this particular problem.
      220a12e9
  2. 12 Sep, 2007 1 commit
  3. 13 Sep, 2007 6 commits
  4. 11 Sep, 2007 4 commits
  5. 12 Sep, 2007 2 commits
  6. 13 Sep, 2007 1 commit
  7. 12 Sep, 2007 8 commits
  8. 11 Sep, 2007 2 commits
  9. 03 Sep, 2007 1 commit
  10. 07 Sep, 2007 1 commit
  11. 12 Sep, 2007 7 commits
  12. 11 Sep, 2007 1 commit
  13. 12 Sep, 2007 1 commit
  14. 31 Aug, 2007 1 commit
  15. 06 Aug, 2007 2 commits
  16. 12 Sep, 2007 1 commit
    • Clemens Fruhwirth's avatar
      Sign extension hack to work around PC64 relocation limitation for binutils <2.17 for x86_64. · b8a64b8e
      Clemens Fruhwirth authored
      binutils <2.17 can't generate PC64 relocations for x86_64. Hence we
      emit only 32 bit PC relative offsets, and artifically stick a zero in
      front of them to make them 64 bit (see PprMach.sh ppr_item in
      pprDataItem). This works as long as the offset is <32bit AND it's
      positive. This is not the case for offsets in jump tables, they are
      all negative. This hack sign extends them with a MOVSXL instruction
      into the dead index register, then adding the properly sign extended
      offset to the jump table base label giving the correct target address
      for the following jump.
      b8a64b8e