Skip to content

Commit a70ce94

Browse files
committed
clean
1 parent b212ac7 commit a70ce94

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/passes/BranchHintAnalysis.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ struct BranchHintCFGAnalysis
154154
}
155155
while (!work.empty()) {
156156
auto* block = work.pop();
157-
// std::cerr << "work on " << debugIds[block] << '\n';
158157

159158
// We should not get here if there is no work.
160159
assert(!block->out.empty());
@@ -167,8 +166,6 @@ struct BranchHintCFGAnalysis
167166
}
168167

169168
auto& chance = block->contents.chance;
170-
// std::cerr << " old " << int(chance) << ", maxOut " << int(maxOut) <<
171-
// '\n';
172169
if (maxOut < chance) {
173170
chance = maxOut;
174171
for (auto* in : block->in) {
@@ -296,21 +293,16 @@ struct BranchHintAnalysis : public Pass {
296293
// chance to go one way then the other, mark it as likely or unlikely
297294
// accordingly. TODO: should we not mark when the difference is small?
298295
for (auto& [func, analysis] : analyzer.map) {
299-
// std::cerr << "lastloop on " << func->name << '\n';
300296
for (auto& block : analysis.basicBlocks) {
301-
// std::cerr << " lastloop block " << block.get() << " with chance " <<
302-
// int(block->contents.chance) << "\n";
303297
if (block->contents.actions.empty() || block->out.size() != 2) {
304298
continue;
305299
}
306300

307301
auto* last = block->contents.actions.back();
308-
// std::cerr << " last " << *last << "\n";
309302
if (!analysis.isBranching(last)) {
310303
continue;
311304
}
312305

313-
// std::cerr << " chances1\n";
314306
// Compare the probabilities of the two targets and see if we can infer
315307
// likelihood.
316308
if (auto likely =

0 commit comments

Comments
 (0)