Avoiding overly aggressive latency scheduling. If the two nodes share an
authorEvan Cheng <evan.cheng@apple.com>
Fri, 29 Oct 2010 18:09:28 +0000 (18:09 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 29 Oct 2010 18:09:28 +0000 (18:09 +0000)
commit089751535d6e9adf65842e2ca5867bf9a70e1e95
tree883781d177686ef496311a6d049024b5b61219ef
parentd7e473c629a5e4fb1584fb5c5c1b0c1e142fdc8f
Avoiding overly aggressive latency scheduling. If the two nodes share an
operand and one of them has a single use that is a live out copy, favor the
one that is live out. Otherwise it will be difficult to eliminate the copy
if the instruction is a loop induction variable update. e.g.

BB:
sub r1, r3, #1
str r0, [r2, r3]
mov r3, r1
cmp
bne BB

=>

BB:
str r0, [r2, r3]
sub r3, r3, #1
cmp
bne BB

This fixed the recent 256.bzip2 regression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117675 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
lib/Target/ARM/ARMBaseInstrInfo.cpp
test/CodeGen/Thumb2/2010-06-14-NEONCoalescer.ll
test/CodeGen/Thumb2/cross-rc-coalescing-2.ll