Skip to content

Commit 7f916ba

Browse files
committed
SILGen - verify incomplete OSSA lifetimes
Use DeadEndBlocks to ignore missing end-borrows and destroys. Allow SILGen to be as sloppy as it wants with OSSA cleanups.
1 parent c588c65 commit 7f916ba

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/SILGen/SILGen.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ SILGenModule::~SILGenModule() {
9191
f.setLinkage(SILLinkage::PublicExternal);
9292
}
9393

94-
M.verify();
94+
M.verifyIncompleteOSSA();
9595
}
9696

9797
static SILDeclRef
@@ -1223,7 +1223,7 @@ void SILGenModule::postEmitFunction(SILDeclRef constant,
12231223
assert(!F->isExternalDeclaration() && "did not emit any function body?!");
12241224
LLVM_DEBUG(llvm::dbgs() << "lowered sil:\n";
12251225
F->print(llvm::dbgs()));
1226-
F->verify();
1226+
F->verifyIncompleteOSSA();
12271227

12281228
emitDifferentiabilityWitnessesForFunction(constant, F);
12291229
}
@@ -1673,7 +1673,7 @@ SILFunction *SILGenModule::emitLazyGlobalInitializer(StringRef funcName,
16731673
auto dc = binding->getDeclContext();
16741674
SILGenFunction(*this, *f, dc).emitLazyGlobalInitializer(binding, pbdEntry);
16751675
emitLazyConformancesForFunction(f);
1676-
f->verify();
1676+
f->verifyIncompleteOSSA();
16771677

16781678
return f;
16791679
}
@@ -2170,7 +2170,7 @@ class SourceFileScope {
21702170

21712171
LLVM_DEBUG(llvm::dbgs() << "lowered toplevel sil:\n";
21722172
toplevel->print(llvm::dbgs()));
2173-
toplevel->verify();
2173+
toplevel->verifyIncompleteOSSA();
21742174
sgm.emitLazyConformancesForFunction(toplevel);
21752175
}
21762176
}

lib/SILGen/SILGenBridging.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ static void buildBlockToFuncThunkBody(SILGenFunction &SGF,
947947
SGF.B.createReturn(loc, r);
948948

949949
// Finally, verify the thunk for SIL invariants.
950-
SGF.F.verify();
950+
SGF.F.verifyIncompleteOSSA();
951951
}
952952

953953
/// Bridge a native function to a block with a thunk.

0 commit comments

Comments
 (0)