Skip to content

Commit be61002

Browse files
authored
Merge pull request #30279 from zoecarver/fix/eager-spec-no-ownership
2 parents ea456f7 + ad7fed0 commit be61002

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/SILOptimizer/IPO/EagerSpecializer.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,12 @@ void EagerSpecializerTransform::run() {
736736

737737
// Process functions in any order.
738738
for (auto &F : *getModule()) {
739-
if (!F.shouldOptimize()) {
739+
// TODO: we should support ownership here but first we'll have to support
740+
// ownership in GenericFuncSpecializer.
741+
if (!F.shouldOptimize() || F.hasOwnership()) {
740742
LLVM_DEBUG(dbgs() << " Cannot specialize function " << F.getName()
741-
<< " marked to be excluded from optimizations.\n");
743+
<< " because it has ownership or is marked to be "
744+
"excluded from optimizations.\n");
742745
continue;
743746
}
744747
// Only specialize functions in their home module.

0 commit comments

Comments
 (0)