Skip to content

Commit debeb6f

Browse files
author
Alexander Yermolovich
committed
updated icf option descriptions
1 parent 39586b3 commit debeb6f

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

bolt/docs/CommandLineArgumentReference.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,12 @@
498498
Automatically put hot code on 2MB page(s) (hugify) at runtime. No manual call
499499
to hugify is needed in the binary (which is what --hot-text relies on).
500500

501-
- `--icf`
501+
- `--icf=<value>`
502502

503503
Fold functions with identical code
504+
- `all`: Enable identical code folding
505+
- `none`: Disable identical code folding (default)
506+
- `safe`: Enable safe identical code folding
504507

505508
- `--icp`
506509

bolt/lib/Core/BinaryContext.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,18 @@ cl::opt<std::string> CompDirOverride(
7676
"to *.dwo files."),
7777
cl::Hidden, cl::init(""), cl::cat(BoltCategory));
7878

79-
cl::opt<bolt::BinaryContext::ICFLevel> ICF(
80-
"icf", cl::desc("fold functions with identical code"),
81-
cl::init(bolt::BinaryContext::ICFLevel::None),
82-
cl::values(
83-
clEnumValN(bolt::BinaryContext::ICFLevel::All, "all", "enable ICF"),
84-
clEnumValN(bolt::BinaryContext::ICFLevel::All, "", "enable ICF"),
85-
clEnumValN(bolt::BinaryContext::ICFLevel::None, "none", "disable ICF"),
86-
clEnumValN(bolt::BinaryContext::ICFLevel::Safe, "safe",
87-
"enable safe ICF")),
88-
cl::ZeroOrMore, cl::ValueOptional, cl::cat(BoltOptCategory));
79+
cl::opt<bolt::BinaryContext::ICFLevel>
80+
ICF("icf", cl::desc("fold functions with identical code"),
81+
cl::init(bolt::BinaryContext::ICFLevel::None),
82+
cl::values(clEnumValN(bolt::BinaryContext::ICFLevel::All, "all",
83+
"Enable identical code folding"),
84+
clEnumValN(bolt::BinaryContext::ICFLevel::All, "",
85+
"Enable identical code folding"),
86+
clEnumValN(bolt::BinaryContext::ICFLevel::None, "none",
87+
"Disable identical code folding (default)"),
88+
clEnumValN(bolt::BinaryContext::ICFLevel::Safe, "safe",
89+
"Enable safe identical code folding")),
90+
cl::ZeroOrMore, cl::ValueOptional, cl::cat(BoltOptCategory));
8991
} // namespace opts
9092

9193
namespace {

0 commit comments

Comments
 (0)