diff options
author | Dan Gohman <gohman@apple.com> | 2009-03-23 16:10:52 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-03-23 16:10:52 +0000 |
commit | 3974667c1a6d48686e92f85bc4463bb239af7442 (patch) | |
tree | 885180354855088c8c993146e69a892076c9c27c /lib/CodeGen/SelectionDAG | |
parent | f871ccb853a2ccbe8675c912330c041b318be8cd (diff) | |
download | external_llvm-3974667c1a6d48686e92f85bc4463bb239af7442.zip external_llvm-3974667c1a6d48686e92f85bc4463bb239af7442.tar.gz external_llvm-3974667c1a6d48686e92f85bc4463bb239af7442.tar.bz2 |
Add a new bit to SUnit to record whether a node has implicit physreg
defs, regardless of whether they are actually used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp index 967a8ce..303f8cc 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp @@ -41,6 +41,7 @@ SUnit *ScheduleDAGSDNodes::Clone(SUnit *Old) { SU->isTwoAddress = Old->isTwoAddress; SU->isCommutable = Old->isCommutable; SU->hasPhysRegDefs = Old->hasPhysRegDefs; + SU->hasPhysRegClobbers = Old->hasPhysRegClobbers; Old->isCloned = true; return SU; } @@ -172,9 +173,11 @@ void ScheduleDAGSDNodes::AddSchedEdges() { // Find all predecessors and successors of the group. for (SDNode *N = SU->getNode(); N; N = N->getFlaggedNode()) { if (N->isMachineOpcode() && - TII->get(N->getMachineOpcode()).getImplicitDefs() && - CountResults(N) > TII->get(N->getMachineOpcode()).getNumDefs()) - SU->hasPhysRegDefs = true; + TII->get(N->getMachineOpcode()).getImplicitDefs()) { + SU->hasPhysRegClobbers = true; + if (CountResults(N) > TII->get(N->getMachineOpcode()).getNumDefs()) + SU->hasPhysRegDefs = true; + } for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) { SDNode *OpN = N->getOperand(i).getNode(); |