forked from OSchip/llvm-project
Don't set SUnit::hasPhysRegDefs to true unless the defs are
actually have uses, which reflects the way it's used. llvm-svn: 67540
This commit is contained in:
parent
5030e5eabe
commit
f477262e69
|
@ -175,7 +175,10 @@ void ScheduleDAGSDNodes::AddSchedEdges() {
|
|||
if (N->isMachineOpcode() &&
|
||||
TII->get(N->getMachineOpcode()).getImplicitDefs()) {
|
||||
SU->hasPhysRegClobbers = true;
|
||||
if (CountResults(N) > TII->get(N->getMachineOpcode()).getNumDefs())
|
||||
unsigned NumUsed = CountResults(N);
|
||||
while (NumUsed != 0 && !N->hasAnyUseOfValue(NumUsed - 1))
|
||||
--NumUsed; // Skip over unused values at the end.
|
||||
if (NumUsed > TII->get(N->getMachineOpcode()).getNumDefs())
|
||||
SU->hasPhysRegDefs = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue