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

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 09:51:53 PDT 2024


michaelmaitland wrote:

> The cost functions within the OutlinedFunction class have been made virtual, allowing for future overrides by GlobalOutlinedFunction. This is crucial because GlobalOutlinedFunction does not have access to Candidates across modules, which represent repeated sequences in the current module. Instead, it uses a proxy of global candidate counts for cost computation.

It sounds like there is an assumption that there will be future overrides by GlobalOutlinedFunction, but it isn't clear when or even if this will ever happen. Maybe it would be better to do this in the same patch where someone is trying to override GlobalOutlinedFunction.

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


More information about the llvm-commits mailing list