From 287fcd38a17821280ce4c669bb8df56189cd6ef3 Mon Sep 17 00:00:00 2001 From: spupyrev Date: Thu, 2 Nov 2023 12:46:36 -0700 Subject: [PATCH] [BOLT] Rename cds to cdsort (#69966) Unify naming for the layout algorithms by renaming "cds" to "cdsort". This is NFC unless someone is already using the new algorithm (which is unlikely). --- bolt/include/bolt/Passes/ReorderFunctions.h | 2 +- bolt/lib/Passes/ReorderFunctions.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bolt/include/bolt/Passes/ReorderFunctions.h b/bolt/include/bolt/Passes/ReorderFunctions.h index 27094bee771ad..8f9507d0a8249 100644 --- a/bolt/include/bolt/Passes/ReorderFunctions.h +++ b/bolt/include/bolt/Passes/ReorderFunctions.h @@ -32,7 +32,7 @@ class ReorderFunctions : public BinaryFunctionPass { RT_EXEC_COUNT, RT_HFSORT, RT_HFSORT_PLUS, - RT_CDS, + RT_CDSORT, RT_PETTIS_HANSEN, RT_RANDOM, RT_USER diff --git a/bolt/lib/Passes/ReorderFunctions.cpp b/bolt/lib/Passes/ReorderFunctions.cpp index d656499cada37..92c50f49d20cf 100644 --- a/bolt/lib/Passes/ReorderFunctions.cpp +++ b/bolt/lib/Passes/ReorderFunctions.cpp @@ -42,7 +42,7 @@ cl::opt ReorderFunctions( "use hfsort algorithm"), clEnumValN(bolt::ReorderFunctions::RT_HFSORT_PLUS, "hfsort+", "use hfsort+ algorithm"), - clEnumValN(bolt::ReorderFunctions::RT_CDS, "cds", + clEnumValN(bolt::ReorderFunctions::RT_CDSORT, "cdsort", "use cache-directed sort"), clEnumValN(bolt::ReorderFunctions::RT_PETTIS_HANSEN, "pettis-hansen", "use Pettis-Hansen algorithm"), @@ -322,7 +322,7 @@ void ReorderFunctions::runOnFunctions(BinaryContext &BC) { case RT_HFSORT_PLUS: Clusters = hfsortPlus(Cg); break; - case RT_CDS: { + case RT_CDSORT: { // It is required that the sum of incoming arc weights is not greater // than the number of samples for every function. Ensuring the call graph // obeys the property before running the algorithm.