Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 36c7d79

Browse files
committedJun 4, 2022
Remove unneeded cl::ZeroOrMore for cl::opt options
Similar to 557efc9. This commit handles options where cl::ZeroOrMore is more than one line below cl::opt.
1 parent bcfc0a9 commit 36c7d79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+195
-226
lines changed
 

‎bolt/lib/Passes/IndirectCallPromotion.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static cl::opt<unsigned> ICPCallsRemainingPercentThreshold(
5050
"icp-calls-remaining-percent-threshold",
5151
cl::desc("The percentage threshold against remaining unpromoted indirect "
5252
"call count for the promotion for calls"),
53-
cl::init(50), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
53+
cl::init(50), cl::Hidden, cl::cat(BoltOptCategory));
5454

5555
static cl::opt<unsigned> ICPCallsTotalPercentThreshold(
5656
"icp-calls-total-percent-threshold",
@@ -63,7 +63,7 @@ static cl::opt<unsigned> ICPMispredictThreshold(
6363
"indirect-call-promotion-mispredict-threshold",
6464
cl::desc("misprediction threshold for skipping ICP on an "
6565
"indirect call"),
66-
cl::init(0), cl::ZeroOrMore, cl::cat(BoltOptCategory));
66+
cl::init(0), cl::cat(BoltOptCategory));
6767

6868
static cl::opt<bool> ICPUseMispredicts(
6969
"indirect-call-promotion-use-mispredicts",
@@ -77,31 +77,31 @@ static cl::opt<unsigned>
7777
ICPTopN("indirect-call-promotion-topn",
7878
cl::desc("limit number of targets to consider when doing indirect "
7979
"call promotion. 0 = no limit"),
80-
cl::init(3), cl::ZeroOrMore, cl::cat(BoltOptCategory));
80+
cl::init(3), cl::cat(BoltOptCategory));
8181

8282
static cl::opt<unsigned> ICPCallsTopN(
8383
"indirect-call-promotion-calls-topn",
8484
cl::desc("limit number of targets to consider when doing indirect "
8585
"call promotion on calls. 0 = no limit"),
86-
cl::init(0), cl::ZeroOrMore, cl::cat(BoltOptCategory));
86+
cl::init(0), cl::cat(BoltOptCategory));
8787

8888
static cl::opt<unsigned> ICPJumpTablesTopN(
8989
"indirect-call-promotion-jump-tables-topn",
9090
cl::desc("limit number of targets to consider when doing indirect "
9191
"call promotion on jump tables. 0 = no limit"),
92-
cl::init(0), cl::ZeroOrMore, cl::cat(BoltOptCategory));
92+
cl::init(0), cl::cat(BoltOptCategory));
9393

9494
static cl::opt<bool> EliminateLoads(
9595
"icp-eliminate-loads",
9696
cl::desc("enable load elimination using memory profiling data when "
9797
"performing ICP"),
98-
cl::init(true), cl::ZeroOrMore, cl::cat(BoltOptCategory));
98+
cl::init(true), cl::cat(BoltOptCategory));
9999

100100
static cl::opt<unsigned> ICPTopCallsites(
101101
"icp-top-callsites",
102102
cl::desc("optimize hottest calls until at least this percentage of all "
103103
"indirect calls frequency is covered. 0 = all callsites"),
104-
cl::init(99), cl::Hidden, cl::ZeroOrMore, cl::cat(BoltOptCategory));
104+
cl::init(99), cl::Hidden, cl::cat(BoltOptCategory));
105105

106106
static cl::list<std::string>
107107
ICPFuncsList("icp-funcs", cl::CommaSeparated,
@@ -112,18 +112,17 @@ static cl::list<std::string>
112112
static cl::opt<bool>
113113
ICPOldCodeSequence("icp-old-code-sequence",
114114
cl::desc("use old code sequence for promoted calls"),
115-
cl::init(false), cl::ZeroOrMore, cl::Hidden,
116-
cl::cat(BoltOptCategory));
115+
cl::Hidden, cl::cat(BoltOptCategory));
117116

118117
static cl::opt<bool> ICPJumpTablesByTarget(
119118
"icp-jump-tables-targets",
120119
cl::desc(
121120
"for jump tables, optimize indirect jmp targets instead of indices"),
122-
cl::init(false), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
121+
cl::Hidden, cl::cat(BoltOptCategory));
123122

124123
static cl::opt<bool> ICPPeelForInline(
125124
"icp-inline", cl::desc("only promote call targets eligible for inlining"),
126-
cl::init(false), cl::ZeroOrMore, cl::Hidden, cl::cat(BoltOptCategory));
125+
cl::Hidden, cl::cat(BoltOptCategory));
127126

128127
} // namespace opts
129128

‎bolt/lib/Passes/TailDuplication.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ static cl::opt<bool> TailDuplicationConstCopyPropagation(
6666
static cl::opt<unsigned> TailDuplicationMaxCacheDistance(
6767
"tail-duplication-max-cache-distance",
6868
cl::desc("The weight of backward jumps for ExtTSP value"), cl::init(256),
69-
cl::ReallyHidden, cl::ZeroOrMore, cl::cat(BoltOptCategory));
69+
cl::ReallyHidden, cl::cat(BoltOptCategory));
7070

7171
static cl::opt<double> TailDuplicationCacheBackwardWeight(
7272
"tail-duplication-cache-backward-weight",
7373
cl::desc(
7474
"The maximum distance (in bytes) of backward jumps for ExtTSP value"),
75-
cl::init(0.5), cl::ReallyHidden, cl::ZeroOrMore, cl::cat(BoltOptCategory));
75+
cl::init(0.5), cl::ReallyHidden, cl::cat(BoltOptCategory));
7676

7777
} // namespace opts
7878

0 commit comments

Comments
 (0)
Please sign in to comment.