diff options
author | Dan Gohman <gohman@apple.com> | 2009-04-16 20:59:02 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-04-16 20:59:02 +0000 |
commit | 0e4042d30b2b47329166f5f784ef3c70f6b408cc (patch) | |
tree | b27546a89d67a95ed1be7d40aa400e49ab5a1015 /lib/CodeGen | |
parent | 8af808a3d64dfdcc5d126e6ad762f57b1483671c (diff) | |
download | external_llvm-0e4042d30b2b47329166f5f784ef3c70f6b408cc.zip external_llvm-0e4042d30b2b47329166f5f784ef3c70f6b408cc.tar.gz external_llvm-0e4042d30b2b47329166f5f784ef3c70f6b408cc.tar.bz2 |
In the list-burr's pseudo two-addr dependency heuristics, don't
add dependencies on nodes with exactly one successor which is a
COPY_TO_REGCLASS node. In the case that the copy is coalesced
away, the dependence should be on the user of the copy, rather
than the copy itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index d7a9636..20a081d 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -1389,6 +1389,16 @@ void RegReductionPriorityQueue<SF>::AddPseudoTwoAddrDeps() { if (SuccSU->getHeight() < SU->getHeight() && (SU->getHeight() - SuccSU->getHeight()) > 1) continue; + // Skip past COPY_TO_REGCLASS nodes, so that the pseudo edge + // constrains whatever is using the copy, instead of the copy + // itself. In the case that the copy is coalesced, this + // preserves the intent of the pseudo two-address heurietics. + while (SuccSU->Succs.size() == 1 && + SuccSU->getNode()->isMachineOpcode() && + SuccSU->getNode()->getMachineOpcode() == + TargetInstrInfo::COPY_TO_REGCLASS) + SuccSU = SuccSU->Succs.front().getSUnit(); + // Don't constrain non-instruction nodes. if (!SuccSU->getNode() || !SuccSU->getNode()->isMachineOpcode()) continue; // Don't constrain nodes with physical register defs if the |