Gratian Lup
2011-Mar-11 11:53 UTC
[LLVMdev] Call profiling and function placement in object file
Hi! I'm interested in profile-guided optimizations and was looking at the functionality LLVM provides. I have two questions: - can the current (optimal) edge profiling be used to determine the number of times a function calls another one? I need to know not only how many times a function was called, but also by whom. Or to say in in a different way, can a profile edge be formed from blocks originating from different functions? I need this information so that I cluster the functions based on the call frequency and the relationship between them. - is there a way to force the linker to place the functions in a specific order in the object file? I mean something like associating a number with each function, and the linker placing the functions ordered by these numbers. The assigned number would be the ID of the cluster in which the function is found. If this is not possible the only idea left would be to place the functions in different sections, but that would interfere with directives written by the user in the source files. Thanks in advance, Gratian PS: It's probably clear that I want to implement a function placement optimization like the one described by Pettis & Hansen. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110311/8510c646/attachment.html>
Reasonably Related Threads
- Regarding basic block layout/code placement optimizations of profile guided optimization (PGO)
- [LLVMdev] About Implementation of Pettis-Hansen's / Gloy's Code Layout Transformation in LLVM
- [LLVMdev] Question about Value Range Propagation
- [LLVMdev] Question about Value Range Propagation
- [LLVMdev] GSOC Project Proposal: Profile-guided optimizations