diff options
author | Dan Gohman <gohman@apple.com> | 2009-02-11 21:29:39 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-02-11 21:29:39 +0000 |
commit | 6571ef3577f35eed62e5a71554a3c1f6dc2fa944 (patch) | |
tree | 3a505d2590e37edc53cb8390185619e5db1d7578 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | |
parent | e5554deb4553c505cac75ed00b404ea4bed01cb1 (diff) | |
download | bcm5719-llvm-6571ef3577f35eed62e5a71554a3c1f6dc2fa944.tar.gz bcm5719-llvm-6571ef3577f35eed62e5a71554a3c1f6dc2fa944.zip |
Don't use special heuristics for nodes with no data predecessors
unless they actually have data successors, and likewise for nodes
with no data successors unless they actually have data precessors.
llvm-svn: 64327
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 55780e40918..0b7f99f42ad 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -989,15 +989,16 @@ namespace { // EXTRACT_SUBREG / INSERT_SUBREG should be close to its use to // facilitate coalescing. return 0; - if (SU->NumSuccs == 0) - // If SU does not have a use, i.e. it doesn't produce a value that would - // be consumed (e.g. store), then it terminates a chain of computation. - // Give it a large SethiUllman number so it will be scheduled right - // before its predecessors that it doesn't lengthen their live ranges. + if (SU->NumSuccs == 0 && SU->NumPreds != 0) + // If SU does not have a register use, i.e. it doesn't produce a value + // that would be consumed (e.g. store), then it terminates a chain of + // computation. Give it a large SethiUllman number so it will be + // scheduled right before its predecessors that it doesn't lengthen + // their live ranges. return 0xffff; - if (SU->NumPreds == 0) - // If SU does not have a def, schedule it close to its uses because it - // does not lengthen any live ranges. + if (SU->NumPreds == 0 && SU->NumSuccs != 0) + // If SU does not have a register def, schedule it close to its uses + // because it does not lengthen any live ranges. return 0; return SethiUllmanNumbers[SU->NodeNum]; } |