Skip to content

Commit 096d32b

Browse files
authored
Merge pull request #25412 from gottesmm/pr-e50b660a602a20338a4dc4bb5447649782a69175
[mandatory-inlining] When running with sil-verify-all, verify at the …
2 parents 629766e + 9c5061d commit 096d32b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/SILOptimizer/Mandatory/MandatoryInlining.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ class MandatoryInlining : public SILModuleTransform {
945945
ClassHierarchyAnalysis *CHA = getAnalysis<ClassHierarchyAnalysis>();
946946
SILModule *M = getModule();
947947
bool ShouldCleanup = !getOptions().DebugSerialization;
948+
bool SILVerifyAll = getOptions().VerifyAll;
948949
DenseFunctionSet FullyInlinedSet;
949950
ImmutableFunctionSet::Factory SetFactory;
950951

@@ -965,6 +966,13 @@ class MandatoryInlining : public SILModuleTransform {
965966
// The inliner splits blocks at call sites. Re-merge trivial branches
966967
// to reestablish a canonical CFG.
967968
mergeBasicBlocks(&F);
969+
970+
// If we are asked to perform SIL verify all, perform that now so that we
971+
// can discover the immediate inlining trigger of the problematic
972+
// function.
973+
if (SILVerifyAll) {
974+
F.verify();
975+
}
968976
}
969977

970978
if (!ShouldCleanup)

0 commit comments

Comments
 (0)