mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 23:25:06 +00:00
Move the check whether it's worth remating to caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -403,6 +403,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
// If it's safe and profitable, remat the definition instead of
|
||||
// copying it.
|
||||
if (DefMI &&
|
||||
DefMI->getDesc().isAsCheapAsAMove() &&
|
||||
DefMI->isSafeToReMat(TII, regB) &&
|
||||
isProfitableToReMat(regB, rc, mi, DefMI, mbbi, Dist,DistanceMap)){
|
||||
DEBUG(cerr << "2addr: REMATTING : " << *DefMI << "\n");
|
||||
|
Reference in New Issue
Block a user