Skip to content

Commit 809f569

Browse files
committed
Remove debug code and update check for successful conversion of
arguments.
1 parent e38da06 commit 809f569

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

lib/IRGen/AllocStackHoisting.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,6 @@ void HoistAllocStack::hoist() {
421421
/// Try to hoist generic alloc_stack instructions to the entry block.
422422
/// Returns true if the function was changed.
423423
bool HoistAllocStack::run() {
424-
llvm::errs() << "Running hoist alloc stack on: " << F->getName() << "\n";
425-
426424
collectHoistableInstructions();
427425

428426
// Nothing to hoist?
@@ -443,7 +441,6 @@ class AllocStackHoisting : public SILFunctionTransform {
443441
if (Changed) {
444442
PM->invalidateAnalysis(F, SILAnalysis::InvalidationKind::Instructions);
445443
}
446-
llvm::errs() << "Completed alloc stack hoisting pass.\n";
447444
}
448445
};
449446
} // end anonymous namespace

lib/SILOptimizer/PassManager/PassManager.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,6 @@ void SILPassManager::runPassOnFunction(unsigned TransIdx, SILFunction *F) {
407407
Mod->registerDeleteNotificationHandler(SFT);
408408
if (breakBeforeRunning(F->getName(), SFT))
409409
LLVM_BUILTIN_DEBUGTRAP;
410-
llvm::errs() << "Running SIL pass: " << SFT->getID() << "\n";
411-
llvm::errs() << "Function named: " << F->getName() << "\n";
412-
F->getLocation().dump(F->getModule().getSourceManager());
413-
llvm::errs() << "***** \n";
414-
415410
SFT->run();
416411
assert(analysesUnlocked() && "Expected all analyses to be unlocked!");
417412
Mod->removeDeleteNotificationHandler(SFT);

lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,6 @@ SILInstruction *SILCombiner::createApplyWithConcreteType(
907907
if (argSub) {
908908
concreteArgCopies.push_back(*argSub);
909909
NewArgs.push_back(argSub->tempArg);
910-
} else {
911-
NewArgs.clear();
912910
}
913911
} else {
914912
// Otherwise, we can just use the value itself.
@@ -936,7 +934,7 @@ SILInstruction *SILCombiner::createApplyWithConcreteType(
936934
});
937935
}
938936

939-
if (NewArgs.empty()) {
937+
if (NewArgs.size() != Apply.getNumArguments()) {
940938
// Remove any new instructions created while attempting to optimize this
941939
// apply. Since the apply was never rewritten, if they aren't removed here,
942940
// they will be removed later as dead when visited by SILCombine, causing

lib/Sema/TypeChecker.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,14 +559,12 @@ swift::handleSILGenericParams(GenericParamList *genericParams,
559559
auto genericParams = nestedList[i];
560560
genericParams->setDepth(i);
561561
}
562-
llvm::errs() << "Checking generic sig...";
562+
563563
auto sig =
564564
TypeChecker::checkGenericSignature(nestedList.back(), DC,
565565
/*parentSig=*/nullptr,
566566
/*allowConcreteGenericParams=*/true);
567-
auto out = (sig ? sig->getGenericEnvironment() : nullptr);
568-
llvm::errs() << "done.\n";
569-
return out;
567+
return (sig ? sig->getGenericEnvironment() : nullptr);
570568
}
571569

572570
void swift::typeCheckPatternBinding(PatternBindingDecl *PBD,

0 commit comments

Comments
 (0)