[llvm] [TailDuplicator] Add a limit on the size of predecessors (PR #78582)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 08:30:53 PST 2024


dwblaikie wrote:

> > > Hmm, CodeGen is not an area I know much about. Could you explain that? What does profile information refer to, the information provided by the PGO?
> > 
> > 
> > Right. Disable tail duplication for blocks with 8 predecessors may hurt performance of some applications. Duplicate blocks into hot predecessors only can still give you the benefit of tail duplication, and at the same time limit the number of duplication. MachineBlockPlacement does the same thing in the late tail duplication (embedded in the MBP).
> 
> But the currently given example does not contain profile information. I don't think this is a solution to the current problem to be considered.

I think the argument is: The currently proposed solution may harm performance in some cases - and that that loss can be mitigated at least in the presence of profile information. (& so with that mitigation, maybe the overall cost is low enough to be worth shipping) - also, even in the absence of real profile information I /think/ we have some codepaths that generate heuristic-based "profile" information (but I might be misremembering/misunderstanding) that might mean the mitigation fires even then.

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


More information about the llvm-commits mailing list