[MachineOutliner][NFC] Check if CandidatesForRepeatedSeq < 2
authorJessica Paquette <jpaquette@apple.com>
Thu, 15 Nov 2018 00:02:24 +0000 (00:02 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 15 Nov 2018 00:02:24 +0000 (00:02 +0000)
There's no reason to call getOutliningCandidateInfo with a single candidate.

llvm-svn: 346913

llvm/lib/CodeGen/MachineOutliner.cpp

index 49d0893..7c58bd7 100644 (file)
@@ -1123,7 +1123,7 @@ unsigned MachineOutliner::findCandidates(
     // We've found something we might want to outline.
     // Create an OutlinedFunction to store it and check if it'd be beneficial
     // to outline.
-    if (CandidatesForRepeatedSeq.empty())
+    if (CandidatesForRepeatedSeq.size() < 2)
       continue;
 
     // Arbitrarily choose a TII from the first candidate.