OSDN Git Service

- Fixed some priority calculation bugs that were causing bug 478. Among them:
authorEvan Cheng <evan.cheng@apple.com>
Thu, 2 Mar 2006 21:38:29 +0000 (21:38 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 2 Mar 2006 21:38:29 +0000 (21:38 +0000)
commit86ec7d1d073dae5b75ad5749f65fc54c141180f5
tree84767eac62eceb644a07d10c983904a18c332d85
parentdb3f873bd80f04a5f1309f7cb1ecc8a2aadc5e3f
- Fixed some priority calculation bugs that were causing bug 478. Among them:
  a predecessor appearing more than once in the operand list was counted as
  multiple predecessor; priority1 should be updated during scheduling;
  CycleBound was updated after the node is inserted into priority queue; one
  of the tie breaking condition was flipped.
- Take into consideration of two address opcodes. If a predecessor is a def&use
  operand, it should have a higher priority.
- Scheduler should also favor floaters, i.e. nodes that do not have real
  predecessors such as MOV32ri.
- The scheduling fixes / tweaks fixed bug 478:
        .text
        .align  4
        .globl  _f
_f:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        movl %eax, %edx
        imull %ecx, %edx
        imull %eax, %eax
        imull %ecx, %ecx
        addl %eax, %ecx
        leal (%ecx,%edx,2), %eax
        ret

  It is also a slight performance win (1% - 3%) for most tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26470 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp