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

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 19:29:26 PDT 2024


================
@@ -670,21 +674,24 @@ void MachineOutliner::findCandidates(
     const TargetInstrInfo *TII =
         CandidatesForRepeatedSeq[0].getMF()->getSubtarget().getInstrInfo();
 
-    std::optional<OutlinedFunction> OF =
-        TII->getOutliningCandidateInfo(*MMI, CandidatesForRepeatedSeq);
+    unsigned MinRepeats = 2;
----------------
kyulee-com wrote:

I hoisted it. I keep using the variable instead of a hard-coded value for better readability. I believe the efficiency-wise, it's the same as the compiler will optimize it.

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


More information about the llvm-commits mailing list