mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
Don't set SUnit::hasPhysRegDefs to true unless the defs are
actually have uses, which reflects the way it's used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67540 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a5c8ae233e
commit
8cccf0ef0c
@ -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…
x
Reference in New Issue
Block a user