Skip to content

Commit 02fdbab

Browse files
authored
Merge pull request swiftlang#28965 from gottesmm/pr-7e132384658610ff479cc66b3449140cde4bd3b2
[sil] Rename TermInst::{getSuccessorBlockArguments,getSuccessorBlockArgumentLists}()
2 parents 746b58e + 321185e commit 02fdbab

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

include/swift/SIL/SILInstruction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6998,13 +6998,13 @@ class TermInst : public NonValueInstruction {
69986998
});
69996999
}
70007000

7001-
using SuccessorBlockArgumentsListTy =
7001+
using SuccessorBlockArgumentListTy =
70027002
TransformRange<ConstSuccessorListTy, function_ref<SILPhiArgumentArrayRef(
70037003
const SILSuccessor &)>>;
70047004

70057005
/// Return the range of Argument arrays for each successor of this
70067006
/// block.
7007-
SuccessorBlockArgumentsListTy getSuccessorBlockArguments() const;
7007+
SuccessorBlockArgumentListTy getSuccessorBlockArgumentLists() const;
70087008

70097009
using SuccessorBlockListTy =
70107010
TransformRange<SuccessorListTy,

lib/SIL/OperandOwnership.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ OperandOwnershipKindClassifier::visitSwitchEnumInst(SwitchEnumInst *sei) {
455455
// Otherwise, go through the ownership constraints of our successor arguments
456456
// and merge them.
457457
auto mergedKind = ValueOwnershipKind::merge(makeTransformRange(
458-
sei->getSuccessorBlockArguments(),
458+
sei->getSuccessorBlockArgumentLists(),
459459
[&](SILPhiArgumentArrayRef array) -> ValueOwnershipKind {
460460
// If the array is empty, we have a non-payloaded case. Return any.
461461
if (array.empty())
@@ -485,7 +485,7 @@ OperandOwnershipKindClassifier::visitCheckedCastBranchInst(
485485
CheckedCastBranchInst *ccbi) {
486486
// TODO: Simplify this using ValueOwnershipKind::merge.
487487
Optional<OperandOwnershipKindMap> map;
488-
for (auto argArray : ccbi->getSuccessorBlockArguments()) {
488+
for (auto argArray : ccbi->getSuccessorBlockArgumentLists()) {
489489
assert(!argArray.empty());
490490

491491
auto argOwnershipKind = argArray[getOperandIndex()]->getOwnershipKind();

lib/SIL/SILInstructions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,13 +1217,13 @@ bool TermInst::isProgramTerminating() const {
12171217
llvm_unreachable("Unhandled TermKind in switch.");
12181218
}
12191219

1220-
TermInst::SuccessorBlockArgumentsListTy
1221-
TermInst::getSuccessorBlockArguments() const {
1220+
TermInst::SuccessorBlockArgumentListTy
1221+
TermInst::getSuccessorBlockArgumentLists() const {
12221222
function_ref<SILPhiArgumentArrayRef(const SILSuccessor &)> op;
12231223
op = [](const SILSuccessor &succ) -> SILPhiArgumentArrayRef {
12241224
return succ.getBB()->getSILPhiArguments();
12251225
};
1226-
return SuccessorBlockArgumentsListTy(getSuccessors(), op);
1226+
return SuccessorBlockArgumentListTy(getSuccessors(), op);
12271227
}
12281228

12291229
YieldInst *YieldInst::create(SILDebugLocation loc,

lib/SILOptimizer/Mandatory/ClosureLifetimeFixup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ cleanupDeadTrivialPhiArgs(SILValue initialValue,
187187
continue;
188188

189189
auto *termInst = cast<TermInst>(user);
190-
for (auto succBlockArgList : termInst->getSuccessorBlockArguments()) {
190+
for (auto succBlockArgList : termInst->getSuccessorBlockArgumentLists()) {
191191
llvm::copy_if(succBlockArgList, std::back_inserter(worklist),
192192
[&](SILPhiArgument *succArg) -> bool {
193193
auto it = lower_bound(insertedPhis, succArg);

lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ static SILInstruction *getNonPhiBlockIncomingValueDef(SILValue incomingValue,
934934
static bool
935935
terminatorHasAnyKnownPhis(TermInst *ti,
936936
ArrayRef<SILPhiArgument *> insertedPhiNodesSorted) {
937-
for (auto succArgList : ti->getSuccessorBlockArguments()) {
937+
for (auto succArgList : ti->getSuccessorBlockArgumentLists()) {
938938
if (llvm::any_of(succArgList, [&](SILPhiArgument *arg) {
939939
return binary_search(insertedPhiNodesSorted, arg);
940940
})) {

lib/SILOptimizer/Mandatory/SemanticARCOpts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ struct SemanticARCOptVisitor
292292

293293
#define FORWARDING_TERM(NAME) \
294294
bool visit##NAME##Inst(NAME##Inst *cls) { \
295-
for (auto succValues : cls->getSuccessorBlockArguments()) { \
295+
for (auto succValues : cls->getSuccessorBlockArgumentLists()) { \
296296
for (SILValue v : succValues) { \
297297
worklist.insert(v); \
298298
} \

0 commit comments

Comments
 (0)