Skip to content

Commit d7c9e32

Browse files
committed
[MachineOutlineer][NFC] Remove unnecessary RepeatedSequenceLocs.clear()
When `getOutliningCandidateInfo()` returns `std::nullopt` (meaning no `OutlinedFunction` is created), there is no need to clear the input argument, `RepeatedSequenceLocs`, as it's already beaing cleared in the main loop of `findCandidates()`.
1 parent 1200d35 commit d7c9e32

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9048,10 +9048,8 @@ AArch64InstrInfo::getOutliningCandidateInfo(
90489048
}
90499049

90509050
// If we dropped all of the candidates, bail out here.
9051-
if (RepeatedSequenceLocs.size() < 2) {
9052-
RepeatedSequenceLocs.clear();
9051+
if (RepeatedSequenceLocs.size() < 2)
90539052
return std::nullopt;
9054-
}
90559053
}
90569054

90579055
// Does every candidate's MBB contain a call? If so, then we might have a call
@@ -9076,10 +9074,8 @@ AArch64InstrInfo::getOutliningCandidateInfo(
90769074

90779075
if (ModStackToSaveLR) {
90789076
// We can't fix up the stack. Bail out.
9079-
if (!AllStackInstrsSafe) {
9080-
RepeatedSequenceLocs.clear();
9077+
if (!AllStackInstrsSafe)
90819078
return std::nullopt;
9082-
}
90839079

90849080
// Save + restore LR.
90859081
NumBytesToCreateFrame += 8;

0 commit comments

Comments
 (0)