[llvm] [MachineOutliner][NFC] Refactor (PR #105398)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 15:12:38 PDT 2024


================
@@ -2088,14 +2088,22 @@ class TargetInstrInfo : public MCInstrInfo {
 
   /// Returns a \p outliner::OutlinedFunction struct containing target-specific
   /// information for a set of outlining candidates. Returns std::nullopt if the
-  /// candidates are not suitable for outlining.
+  /// candidates are not suitable for outlining. \p MinRep is the minimum
+  /// number of times the instruction sequence must be repeated.
   virtual std::optional<outliner::OutlinedFunction> getOutliningCandidateInfo(
       const MachineModuleInfo &MMI,
-      std::vector<outliner::Candidate> &RepeatedSequenceLocs) const {
+      std::vector<outliner::Candidate> &RepeatedSequenceLocs,
+      unsigned MipRep) const {
----------------
ellishg wrote:

Also, can we do `unsigned MinRep=2` to set a default value instead of creating a new function?

https://github.com/llvm/llvm-project/pull/105398


More information about the llvm-commits mailing list