@@ -423,7 +423,7 @@ static bool sinkArgument(SILBasicBlock *BB, unsigned ArgNum) {
423
423
if (!FSI)
424
424
return false ;
425
425
426
- SILValue Undef = SILUndef::get (FirstPredArg.getType (), BB->getModule ());
426
+ auto * Undef = SILUndef::get (FirstPredArg.getType (), BB->getModule ());
427
427
428
428
// Delete the debug info of the instruction that we are about to sink.
429
429
deleteAllDebugUses (FSI);
@@ -435,7 +435,7 @@ static bool sinkArgument(SILBasicBlock *BB, unsigned ArgNum) {
435
435
// The instruction we are lowering has an argument which is different
436
436
// for each predecessor. We need to sink the instruction, then add
437
437
// arguments for each predecessor.
438
- SILValue ( BB->getBBArg (ArgNum)). replaceAllUsesWith (FSI);
438
+ BB->getBBArg (ArgNum)-> replaceAllUsesWith (FSI);
439
439
440
440
const auto &ArgType = FSI->getOperand (*DifferentOperandIndex).getType ();
441
441
BB->replaceBBArg (ArgNum, ArgType);
@@ -465,16 +465,16 @@ static bool sinkArgument(SILBasicBlock *BB, unsigned ArgNum) {
465
465
}
466
466
467
467
// Sink one of the copies of the instruction.
468
- FirstPredArg. replaceAllUsesWith (Undef);
468
+ FirstPredArg-> replaceAllUsesWith (Undef);
469
469
FSI->moveBefore (&*BB->begin ());
470
- SILValue ( BB->getBBArg (ArgNum)). replaceAllUsesWith (FirstPredArg);
470
+ BB->getBBArg (ArgNum)-> replaceAllUsesWith (FirstPredArg. getDef () );
471
471
472
472
// The argument is no longer in use. Replace all incoming inputs with undef
473
473
// and try to delete the instruction.
474
474
for (auto S : Clones)
475
475
if (S.getDef () != FSI) {
476
476
deleteAllDebugUses (S.getDef ());
477
- S. replaceAllUsesWith (Undef);
477
+ S-> replaceAllUsesWith (Undef);
478
478
auto DeadArgInst = cast<SILInstruction>(S.getDef ());
479
479
recursivelyDeleteTriviallyDeadInstructions (DeadArgInst);
480
480
}
0 commit comments