Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/swift/SILOptimizer/Analysis/ARCAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ class EpilogueARCContext {
RCIdentityFunctionInfo *RCFI;

/// The epilogue retains or releases.
llvm::SmallVector<SILInstruction *, 1> EpilogueARCInsts;
llvm::SmallSetVector<SILInstruction *, 1> EpilogueARCInsts;

/// All the retain/release block state for all the basic blocks in the function.
llvm::DenseMap<SILBasicBlock *, EpilogueARCBlockState *> EpilogueARCBlockStates;
Expand Down Expand Up @@ -507,7 +507,7 @@ class EpilogueARCContext {

/// Reset the epilogue arc instructions.
void resetEpilogueARCInsts() { EpilogueARCInsts.clear(); }
llvm::SmallVector<SILInstruction *, 1> getEpilogueARCInsts() {
llvm::SmallSetVector<SILInstruction *, 1> getEpilogueARCInsts() {
return EpilogueARCInsts;
}

Expand Down Expand Up @@ -577,7 +577,7 @@ class EpilogueARCContext {
/// empty set if no epilogue ARC instructions can be found.
///
/// NOTE: This function assumes Arg is has @owned semantic.
llvm::SmallVector<SILInstruction *, 1>
llvm::SmallSetVector<SILInstruction *, 1>
computeEpilogueARCInstructions(EpilogueARCContext::EpilogueARCKind Kind,
SILValue Arg, SILFunction *F,
PostOrderFunctionInfo *PO, AliasAnalysis *AA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct ResultDescriptor {
/// If non-null, this is the release in the return block of the callee, which
/// is associated with this parameter if it is @owned. If the parameter is not
/// @owned or we could not find such a release in the callee, this is null.
RetainList CalleeRetain;
llvm::SmallSetVector<SILInstruction *, 1> CalleeRetain;

/// This is owned to guaranteed.
bool OwnedToGuaranteed;
Expand Down
4 changes: 2 additions & 2 deletions lib/SILOptimizer/Analysis/ARCAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ bool EpilogueARCContext::computeEpilogueARC() {
for (auto I = B->rbegin(), E = B->rend(); I != E; ++I) {
// This is a transition from 1 to 0 due to an interested instruction.
if (isInterestedInstruction(&*I)) {
EpilogueARCInsts.push_back(&*I);
EpilogueARCInsts.insert(&*I);
break;
}
// This is a transition from 1 to 0 due to a blocking instruction.
Expand All @@ -1308,7 +1308,7 @@ bool EpilogueARCContext::computeEpilogueARC() {
return true;
}

llvm::SmallVector<SILInstruction *, 1>
llvm::SmallSetVector<SILInstruction *, 1>
swift::computeEpilogueARCInstructions(EpilogueARCContext::EpilogueARCKind Kind,
SILValue Arg, SILFunction *F,
PostOrderFunctionInfo *PO, AliasAnalysis *AA,
Expand Down
4 changes: 2 additions & 2 deletions lib/SILOptimizer/UtilityPasses/EpilogueARCMatcherDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ class SILEpilogueARCMatcherDumper : public SILModuleTransform {
llvm::outs() << *Arg;

// Find the retain instructions for the argument.
llvm::SmallVector<SILInstruction *, 1> RelInsts =
llvm::SmallSetVector<SILInstruction *, 1> RelInsts =
computeEpilogueARCInstructions(EpilogueARCContext::EpilogueARCKind::Release,
Arg, &F, PO, AA, RCFI);
for (auto I : RelInsts) {
llvm::outs() << *I << "\n";
}

// Find the release instructions for the argument.
llvm::SmallVector<SILInstruction *, 1> RetInsts =
llvm::SmallSetVector<SILInstruction *, 1> RetInsts =
computeEpilogueARCInstructions(EpilogueARCContext::EpilogueARCKind::Retain,
Arg, &F, PO, AA, RCFI);
for (auto I : RetInsts) {
Expand Down