@@ -1492,11 +1492,13 @@ class AvailableValueDataflowContext {
1492
1492
// / StartingFrom. We only compute the values for set bits in \p
1493
1493
// / RequiredElts. We return the vailable values in \p Result. If any available
1494
1494
// / values were found, return true. Otherwise, return false.
1495
- bool computeAvailableValues (SILInstruction *StartingFrom,
1496
- LoadInfo loadInfo,
1497
- SmallBitVector &RequiredElts,
1498
- SmallVectorImpl<AvailableValue> &Result);
1499
-
1495
+ // /
1496
+ // / In OptimizationMode::PreserveAlloc, this may insert casts and copies to
1497
+ // / propagate owned values.
1498
+ bool computeAvailableElementValues (SILInstruction *StartingFrom,
1499
+ LoadInfo loadInfo,
1500
+ SmallBitVector &RequiredElts,
1501
+ SmallVectorImpl<AvailableValue> &Result);
1500
1502
1501
1503
void computeAvailableValuesFrom (
1502
1504
SILBasicBlock::iterator StartingFrom, SILBasicBlock *BB,
@@ -1608,7 +1610,8 @@ AvailableValueDataflowContext::computeAvailableValues(
1608
1610
RequiredElts.set (*loadInfo.range ().begin (), *loadInfo.range ().end ());
1609
1611
1610
1612
// Find out if we have any available values.
1611
- if (!computeAvailableValues (Inst, loadInfo, RequiredElts, AvailableValues)) {
1613
+ if (!computeAvailableElementValues (Inst, loadInfo, RequiredElts,
1614
+ AvailableValues)) {
1612
1615
return std::nullopt;
1613
1616
}
1614
1617
return loadInfo;
@@ -1801,7 +1804,7 @@ void AvailableValueDataflowContext::updateAvailableValues(
1801
1804
return ;
1802
1805
}
1803
1806
1804
- bool AvailableValueDataflowContext::computeAvailableValues (
1807
+ bool AvailableValueDataflowContext::computeAvailableElementValues (
1805
1808
SILInstruction *StartingFrom, LoadInfo loadInfo,
1806
1809
SmallBitVector &RequiredElts, SmallVectorImpl<AvailableValue> &Result) {
1807
1810
llvm::SmallDenseMap<SILBasicBlock*, SmallBitVector, 32 > VisitedBlocks;
0 commit comments