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

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 10:01:26 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 {
----------------
kyulee-com wrote:

I just made `MinRepeates` explicit for `getOutliningCandidateInfo`. I don't want it to be a field/property as TargetInstrInfo as this value can be overridden by the client (either for creating candidates for the local outliner vs. for the global outliner). 

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


More information about the llvm-commits mailing list