diff options
author | Andrew Trick <atrick@apple.com> | 2011-03-09 19:12:43 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-03-09 19:12:43 +0000 |
commit | 4bbf4678e341e9bf899c0faa3e3bcfe134db81eb (patch) | |
tree | 94f494197952c39de102afa3e427be0dd73b4d89 /lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | |
parent | d1cba8727a1ee713030d9e6bbd72523a9f9e2a60 (diff) | |
download | llvm-4bbf4678e341e9bf899c0faa3e3bcfe134db81eb.tar.gz llvm-4bbf4678e341e9bf899c0faa3e3bcfe134db81eb.tar.bz2 llvm-4bbf4678e341e9bf899c0faa3e3bcfe134db81eb.tar.xz |
Improve pre-RA-sched register pressure tracking for duplicate operands.
This helps cases like 2008-07-19-movups-spills.ll, but doesn't have an obvious impact on benchmarks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp index b762af5ca9..202f7ab4e1 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp @@ -419,11 +419,15 @@ void ScheduleDAGSDNodes::AddSchedEdges() { ST.adjustSchedDependency(OpSU, SU, const_cast<SDep &>(dep)); } - if (!SU->addPred(dep) && !dep.isCtrl() && OpSU->NumRegDefsLeft > 0) { + if (!SU->addPred(dep) && !dep.isCtrl() && OpSU->NumRegDefsLeft > 1) { // Multiple register uses are combined in the same SUnit. For example, // we could have a set of glued nodes with all their defs consumed by // another set of glued nodes. Register pressure tracking sees this as // a single use, so to keep pressure balanced we reduce the defs. + // + // We can't tell (without more book-keeping) if this results from + // glued nodes or duplicate operands. As long as we don't reduce + // NumRegDefsLeft to zero, we handle the common cases well. --OpSU->NumRegDefsLeft; } } |