[llvm] [MachineOutliner][NFC] Refactor (PR #105398)
Vincent Lee via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 16:41:02 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;
----------------
thevinster wrote:
Might want to hoist this value above L669 since it also references `2`. Alternatively, you could leave the hardcoding of 2 everywhere and just parameterize `getOutliningCandidateInfo` (since that's the function needed from the global outliner). My preference is to hardcode it because I'm not sure if there are any other parts of the codebase that also make the assumption of 2 that need to stored in a variable.
https://github.com/llvm/llvm-project/pull/105398
More information about the llvm-commits
mailing list