[all-commits] [llvm/llvm-project] a7e13a: A new code layout algorithm for function reorderin...
spupyrev via All-commits
all-commits at lists.llvm.org
Fri Jul 7 07:25:53 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a7e13a99c2c637d06a0bd533fedc96fdac03654e
https://github.com/llvm/llvm-project/commit/a7e13a99c2c637d06a0bd533fedc96fdac03654e
Author: spupyrev <spupyrev at fb.com>
Date: 2023-07-07 (Fri, 07 Jul 2023)
Changed paths:
M llvm/lib/Transforms/Utils/CodeLayout.cpp
Log Message:
-----------
A new code layout algorithm for function reordering [1/3]
We are brining a new algorithm for function layout (reordering) based on the
call graph (extracted from a profile data). The algorithm is an improvement of
top of a known heuristic, C^3. It tries to co-locate hot and frequently executed
together functions in the resulting ordering. Unlike C^3, it explores a larger
search space and have an objective closely tied to the performance of
instruction and i-TLB caches. Hence, the name CDS = Cache-Directed Sort.
The algorithm can be used at the linking or post-linking (e.g., BOLT) stage.
This diff modifies the existing data structures to facilitate the implementation
(down the stack). This is a no-op change.
Reviewed By: hoy
Differential Revision: https://reviews.llvm.org/D152833
More information about the All-commits
mailing list