[llvm] [BOLT] Add support for safe-icf (PR #116275)
Amir Ayupov via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 15 16:47:07 PST 2024
================
@@ -75,8 +75,59 @@ cl::opt<std::string> CompDirOverride(
"location, which is used with DW_AT_dwo_name to construct a path "
"to *.dwo files."),
cl::Hidden, cl::init(""), cl::cat(BoltCategory));
+
+cl::opt<std::string> ICF("icf", cl::desc("fold functions with identical code"),
----------------
aaupov wrote:
You can directly encode enum values using `clEnumVal`: https://llvm.org/docs/CommandLine.html
We have a few uses in BOLT, e.g. in ICP, peepholes, jump-tables: https://github.com/llvm/llvm-project/blob/1be98277547d3a9b9966f055c8e4939390ac4697/bolt/lib/Core/BinaryFunction.cpp#L86-L98
https://github.com/llvm/llvm-project/pull/116275
More information about the llvm-commits
mailing list