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

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 10:04:26 PDT 2024


================
@@ -684,7 +688,7 @@ void MachineOutliner::findCandidates(
       continue;
     }
 
-    FunctionList.push_back(*OF);
+    FunctionList.push_back(std::make_unique<OutlinedFunction>(*OF));
----------------
kyulee-com wrote:

This isn't quite right, but either case created implicit copy from the local OutlinedFunction instance. Instead, I also make it unique when it's created in `getOutliningCandidateInfo` so that we can simply move it here.

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


More information about the llvm-commits mailing list