Skip to content

Commit 830a366

Browse files
committed
Rename overloaded computeAvailableValues.
Overloaded names create confusion.
1 parent 844d103 commit 830a366

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,11 +1492,13 @@ class AvailableValueDataflowContext {
14921492
/// StartingFrom. We only compute the values for set bits in \p
14931493
/// RequiredElts. We return the vailable values in \p Result. If any available
14941494
/// 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);
15001502

15011503
void computeAvailableValuesFrom(
15021504
SILBasicBlock::iterator StartingFrom, SILBasicBlock *BB,
@@ -1608,7 +1610,8 @@ AvailableValueDataflowContext::computeAvailableValues(
16081610
RequiredElts.set(*loadInfo.range().begin(), *loadInfo.range().end());
16091611

16101612
// Find out if we have any available values.
1611-
if (!computeAvailableValues(Inst, loadInfo, RequiredElts, AvailableValues)) {
1613+
if (!computeAvailableElementValues(Inst, loadInfo, RequiredElts,
1614+
AvailableValues)) {
16121615
return std::nullopt;
16131616
}
16141617
return loadInfo;
@@ -1801,7 +1804,7 @@ void AvailableValueDataflowContext::updateAvailableValues(
18011804
return;
18021805
}
18031806

1804-
bool AvailableValueDataflowContext::computeAvailableValues(
1807+
bool AvailableValueDataflowContext::computeAvailableElementValues(
18051808
SILInstruction *StartingFrom, LoadInfo loadInfo,
18061809
SmallBitVector &RequiredElts, SmallVectorImpl<AvailableValue> &Result) {
18071810
llvm::SmallDenseMap<SILBasicBlock*, SmallBitVector, 32> VisitedBlocks;

0 commit comments

Comments
 (0)