[PATCH] D155513: [BOLT][NFC] Rename icf-dfs option variable to ICFUseDFS

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 14:16:00 PDT 2023


Amir created this revision.
Amir added reviewers: bolt, spupyrev.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

Rename to avoid collision with profile-use-dfs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155513

Files:
  bolt/lib/Passes/IdenticalCodeFolding.cpp


Index: bolt/lib/Passes/IdenticalCodeFolding.cpp
===================================================================
--- bolt/lib/Passes/IdenticalCodeFolding.cpp
+++ bolt/lib/Passes/IdenticalCodeFolding.cpp
@@ -32,9 +32,9 @@
 
 extern cl::OptionCategory BoltOptCategory;
 
-static cl::opt<bool> UseDFS("icf-dfs",
-                            cl::desc("use DFS ordering when using -icf option"),
-                            cl::ReallyHidden, cl::cat(BoltOptCategory));
+static cl::opt<bool>
+    ICFUseDFS("icf-dfs", cl::desc("use DFS ordering when using -icf option"),
+              cl::ReallyHidden, cl::cat(BoltOptCategory));
 
 static cl::opt<bool>
 TimeICF("time-icf",
@@ -170,7 +170,7 @@
   // Process both functions in either DFS or existing order.
   SmallVector<const BinaryBasicBlock *, 0> OrderA;
   SmallVector<const BinaryBasicBlock *, 0> OrderB;
-  if (opts::UseDFS) {
+  if (opts::ICFUseDFS) {
     copy(A.dfs(), std::back_inserter(OrderA));
     copy(B.dfs(), std::back_inserter(OrderB));
   } else {
@@ -360,7 +360,7 @@
 
       // Pre-compute hash before pushing into hashtable.
       // Hash instruction operands to minimize hash collisions.
-      BF.computeHash(opts::UseDFS, [&BC](const MCOperand &Op) {
+      BF.computeHash(opts::ICFUseDFS, [&BC](const MCOperand &Op) {
         return hashInstOperand(BC, Op);
       });
     };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155513.541232.patch
Type: text/x-patch
Size: 1355 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230717/b5ac86f9/attachment.bin>


More information about the llvm-commits mailing list