@@ -154,7 +154,6 @@ struct BranchHintCFGAnalysis
154
154
}
155
155
while (!work.empty ()) {
156
156
auto * block = work.pop ();
157
- // std::cerr << "work on " << debugIds[block] << '\n';
158
157
159
158
// We should not get here if there is no work.
160
159
assert (!block->out .empty ());
@@ -167,8 +166,6 @@ struct BranchHintCFGAnalysis
167
166
}
168
167
169
168
auto & chance = block->contents .chance ;
170
- // std::cerr << " old " << int(chance) << ", maxOut " << int(maxOut) <<
171
- // '\n';
172
169
if (maxOut < chance) {
173
170
chance = maxOut;
174
171
for (auto * in : block->in ) {
@@ -296,21 +293,16 @@ struct BranchHintAnalysis : public Pass {
296
293
// chance to go one way then the other, mark it as likely or unlikely
297
294
// accordingly. TODO: should we not mark when the difference is small?
298
295
for (auto & [func, analysis] : analyzer.map ) {
299
- // std::cerr << "lastloop on " << func->name << '\n';
300
296
for (auto & block : analysis.basicBlocks ) {
301
- // std::cerr << " lastloop block " << block.get() << " with chance " <<
302
- // int(block->contents.chance) << "\n";
303
297
if (block->contents .actions .empty () || block->out .size () != 2 ) {
304
298
continue ;
305
299
}
306
300
307
301
auto * last = block->contents .actions .back ();
308
- // std::cerr << " last " << *last << "\n";
309
302
if (!analysis.isBranching (last)) {
310
303
continue ;
311
304
}
312
305
313
- // std::cerr << " chances1\n";
314
306
// Compare the probabilities of the two targets and see if we can infer
315
307
// likelihood.
316
308
if (auto likely =
0 commit comments