Let's say I have an algorithm which would optimize subroutine ordering, in hopes to reduce TLB misses.
How would one be able actually to reorder subroutines at run-time in gcc compiler? So far I presume that it would be possible to write a gcc plugin for this. How ever I have no idea how to actually write them let alone that it is possible at all.