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

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 10:33:44 PDT 2024


kyulee-com 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 (in this patch) 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.

Yeah. I removed the code and updated the summary accordingly.

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


More information about the llvm-commits mailing list