-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[BOLT] Add support for safe-icf #116275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BOLT] Add support for safe-icf #116275
Changes from all commits
03ca42c
237c02e
d794fb0
6e853ca
e36ec02
b83c335
39c7902
39586b3
debeb6f
429075e
29cc466
bf3bf2b
e867900
ab51077
8fe4b3c
dc41c58
6287a7f
c6a1965
d393b5e
4ace9bd
09bc3fa
3912b85
769cf24
d4f81c9
ec54f24
13bcc22
5110f74
d524ed5
77ae0a2
d03ff1d
38758ee
bfb1dc6
417196c
bbf015f
1ef1d27
f1813b3
eb882e5
f6dcb90
0070ceb
0f96524
a9cd467
6a89d5c
645aac2
23ea76b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,9 @@ extern cl::opt<bool> PrintDynoStats; | |
extern cl::opt<bool> DumpDotAll; | ||
extern cl::opt<std::string> AsmDump; | ||
extern cl::opt<bolt::PLTCall::OptType> PLT; | ||
extern cl::opt<bolt::IdenticalCodeFolding::ICFLevel, false, | ||
llvm::bolt::DeprecatedICFNumericOptionParser> | ||
ICF; | ||
|
||
static cl::opt<bool> | ||
DynoStatsAll("dyno-stats-all", | ||
|
@@ -65,9 +68,6 @@ static cl::opt<bool> | |
cl::desc("eliminate unreachable code"), cl::init(true), | ||
cl::cat(BoltOptCategory)); | ||
|
||
cl::opt<bool> ICF("icf", cl::desc("fold functions with identical code"), | ||
cl::cat(BoltOptCategory)); | ||
|
||
static cl::opt<bool> JTFootprintReductionFlag( | ||
"jt-footprint-reduction", | ||
cl::desc("make jump tables size smaller at the cost of using more " | ||
|
@@ -398,7 +398,7 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) { | |
opts::StripRepRet); | ||
|
||
Manager.registerPass(std::make_unique<IdenticalCodeFolding>(PrintICF), | ||
opts::ICF); | ||
opts::ICF != IdenticalCodeFolding::ICFLevel::None); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: define a helper method There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems over complicating things over three checks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reduces diff changes. But it's a nit, so up to you. |
||
|
||
Manager.registerPass( | ||
std::make_unique<SpecializeMemcpy1>(NeverPrint, opts::SpecializeMemcpy1), | ||
|
@@ -423,7 +423,7 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) { | |
Manager.registerPass(std::make_unique<Inliner>(PrintInline)); | ||
|
||
Manager.registerPass(std::make_unique<IdenticalCodeFolding>(PrintICF), | ||
opts::ICF); | ||
opts::ICF != IdenticalCodeFolding::ICFLevel::None); | ||
|
||
Manager.registerPass(std::make_unique<PLTCall>(PrintPLT)); | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.