[llvm] [BOLT] Add support for safe-icf (PR #116275)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 18:00:28 PST 2024


================
@@ -75,8 +75,67 @@ 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<bolt::BinaryContext::ICFLevel> ICF(
+    "icf", cl::desc("fold functions with identical code"),
+    cl::init(bolt::BinaryContext::ICFLevel::None),
+    cl::values(
+        clEnumValN(bolt::BinaryContext::ICFLevel::All, "all", "enable ICF"),
+        clEnumValN(bolt::BinaryContext::ICFLevel::All, "", "enable ICF"),
----------------
ayermolo wrote:

Thi sis to handle --icf and --icf=all

https://github.com/llvm/llvm-project/pull/116275


More information about the llvm-commits mailing list