[PATCH] D152834: A new code layout algorithm for function reordering [2/3]

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 13:22:28 PDT 2023


rahmanl added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Utils/CodeLayout.h:56
 
+/// Algorithm-specific params for Cache-Directed Sort. The values are tuned for
+/// the best performance of large-scale front-end bound binaries.
----------------
spupyrev wrote:
> rahmanl wrote:
> > Please introduce cl::opts for these so they can be manually configured.
> Based on my experience, exposing such constants doesn't add much value but may confuse some people. For example, C^3 has a bunch of similar options tuned once on a specific benchmark years ago, and no one has ever tried to re-consider them :) A have similar experience for other algorithms, where the defaults were never touched. At this time I consider the values as some internal algorithm-specific constants that are not supposed to be modified.
> However, cl:opts take just a few lines of code, so i'm happy to add those if you have an alternative opinion.
> 
The configurations here look very architecture-dependent. So I am assuming that as hardware improves, we may increase these parameters to get a better result. WDYT?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152834/new/

https://reviews.llvm.org/D152834



More information about the llvm-commits mailing list