Skip to content

Commit 708e2e2

Browse files
committed
debug CI
1 parent 49e08d5 commit 708e2e2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/SILOptimizer/IPO/CrossModuleOptimization.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,19 +499,23 @@ bool CrossModuleOptimization::canSerializeFunction(
499499
// First, visit each instruction and see if its lowered types
500500
// are serializalbe and track them in a map.
501501
visitor.visit(&inst);
502-
if (!visitor.canSerializeTypesInInst(&inst))
502+
if (!visitor.canSerializeTypesInInst(&inst)) {
503+
M.reclaimUnresolvedLocalArchetypeDefinitions();
503504
return false;
505+
}
504506
// If serializable, check if any fields in the instruction (that
505507
// are not covered in the visitor) can be serialized.
506-
if (!canSerializeFieldsByInstructionKind(&inst, canSerializeFlags, maxDepth))
508+
if (!canSerializeFieldsByInstructionKind(&inst, canSerializeFlags, maxDepth)) {
509+
M.reclaimUnresolvedLocalArchetypeDefinitions();
507510
return false;
508-
511+
}
509512
for (SILValue result : inst.getResults()) {
510513
if (!canSerializeType(result->getType())) {
511514
llvm::dbgs() << "\nChecking result: \n";
512515
inst.dump();
513516
llvm::dbgs() << "\nIn function: \n";
514517
inst.getFunction()->dump();
518+
M.reclaimUnresolvedLocalArchetypeDefinitions();
515519
return false;
516520
}
517521
}
@@ -521,6 +525,7 @@ bool CrossModuleOptimization::canSerializeFunction(
521525
inst.dump();
522526
llvm::dbgs() << "\nIn function: \n";
523527
inst.getFunction()->dump();
528+
M.reclaimUnresolvedLocalArchetypeDefinitions();
524529
return false;
525530
}
526531
}

0 commit comments

Comments
 (0)