[A57FPLoadBalancing] Modify r217689 - actually we do need to check defs

... Just make sure we check uses first so we see the kill first. It
turns out ignoring defs gives some pretty nasty runtime failures.
I'm certain this is the fix but I'm still reducing a testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217735 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
James Molloy 2014-09-14 18:24:26 +00:00
parent 5bf1f01c15
commit 4fb9bbe72f

View File

@ -582,7 +582,9 @@ scanInstruction(MachineInstr *MI, unsigned Idx,
if (isMul(MI)) {
for (auto &I : MI->operands())
for (auto &I : MI->uses())
maybeKillChain(I, Idx, ActiveChains);
for (auto &I : MI->defs())
maybeKillChain(I, Idx, ActiveChains);
// Create a new chain. Multiplies don't require forwarding so can go on any
@ -644,7 +646,9 @@ scanInstruction(MachineInstr *MI, unsigned Idx,
// Non-MUL or MLA instruction. Invalidate any chain in the uses or defs
// lists.
for (auto &I : MI->operands())
for (auto &I : MI->uses())
maybeKillChain(I, Idx, ActiveChains);
for (auto &I : MI->defs())
maybeKillChain(I, Idx, ActiveChains);
}
@ -657,10 +661,6 @@ maybeKillChain(MachineOperand &MO, unsigned Idx,
// determine if a chain should be ended and remove from ActiveChains.
MachineInstr *MI = MO.getParent();
if (MO.isReg() && MO.isDef())
// We don't care about defs. We see them before uses, so reject them early.
return;
if (MO.isReg()) {
// If this is a KILL of a current chain, record it.