RFC: Temporal Profiling Extension for IRPGO

I would like to mention that I recently landed ⚙ D147812 [InstrProf] Use BalancedPartitioning to order temporal profiling trace data which implements the balanced partitioning algorithm described in Optimizing Function Layout for Mobile Applications. With this work, we can use a profile with temporal traces to compute a function order using the llvm-profdata tool.

llvm-profdata order default.profdata -o order.txt

Then order.txt can be passed to the linker to layout functions using -symbol-ordering-file on ELF or -order-file on Mach-O.

Edit: Updated link to paper.

4 Likes