Spot by Bruno.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241505
91177308-0d34-0410-b5e6-
96231b3b80d8
// addl %esi, %edi
// movl %edi, %eax
// ret
// addl %esi, %edi
// movl %edi, %eax
// ret
// If it's profitable to commute, try to do so.
if (TryCommute && commuteInstruction(mi, regB, regC, Dist)) {
// If it's profitable to commute, try to do so.
if (TryCommute && commuteInstruction(mi, regB, regC, Dist)) {
++NumCommuted;
if (AggressiveCommute)
++NumAggrCommuted;
++NumCommuted;
if (AggressiveCommute)
++NumAggrCommuted;
// If there is one more use of regB later in the same MBB, consider
// re-schedule this MI below it.
// If there is one more use of regB later in the same MBB, consider
// re-schedule this MI below it.
- if (!commuted && EnableRescheduling && rescheduleMIBelowKill(mi, nmi, regB)) {
+ if (!Commuted && EnableRescheduling && rescheduleMIBelowKill(mi, nmi, regB)) {
++NumReSchedDowns;
return true;
}
++NumReSchedDowns;
return true;
}
}
// Return if it is commuted but 3 addr conversion is failed.
}
// Return if it is commuted but 3 addr conversion is failed.
return false;
// If there is one more use of regB later in the same MBB, consider
return false;
// If there is one more use of regB later in the same MBB, consider