Bump. Hello experts, Looking through the code, I noticed cgraph_node::tp_first_run that helps in implementation of "-fprofile-reorder-functions". Can someone please comment on how feasible it would be to implement ordering functions based on "Last" time of execution? Thank you. On Tue, Jan 25, 2022 at 4:48 PM prem paulson <prempaulson@xxxxxxxxx> wrote: > Hello, > > I am experimenting with function reordering using PGO. I am looking at > ordering functions based on the Last time of execution. For example, if the > sequence of calls from profile feedback is: > > func1() -> func2() -> func3() -> func1()->func4() > > I would like the reordering in the binary as follows: > > func2 > func3 > func1 > func4 > > The closest option I see is -fprofile-reorder-functions but it reorders > based on the first time of execution. > > -fprofile-reorder-functions > Function reordering based on profile instrumentation collects first time > of execution of a function and orders these functions in ascending order. > > Is there any similar option that can help me achieve this? > > Thanks in advance. > >