Ping > On 9 Oct 2025, at 9:10 PM, Prachi Godbole <[email protected]> wrote: > > This patch adds support to linker driven function reordering by creating > function sections with a prefix '.text.sorted' which are then sorted using > SORT in by the linker. Appropriate support for this is already present in > binutils. > > Bootstrapped and regtested on aarch64-linux-gnu. Ok for mainline? > > Thanks, > Prachi > > Signed-off-by: Prachi Godbole [email protected] > > gcc/ChangeLog: > > * cgraph.cc (cgraph_node::dump): Dump value of text_locality_order. > * cgraph.h (struct cgraph_node): New variable text_locality_order. > * cgraphclones.cc (cgraph_node::create_clone): Initialize > text_locality_order. > * cgraphunit.cc (expand_all_functions): Update text_locality_order. > * ipa-locality-cloning.cc (get_default_locality_order): New function. > (add_node_to_partition): Update text_locality_order. > * lto-cgraph.cc (lto_output_node): Write text_locality_order to file. > (input_node): Read text_locality_order. > * varasm.cc (default_function_section): Create function sections based > on text_locality_order. > > <0001-PATCH-Use-linker-sections-to-explicitly-order-functi.patch>
smime.p7s
Description: S/MIME cryptographic signature
