Skip to content

Commit 37e4945

Browse files
authored
[BOLT][NFC] Clean up MCF (#93065)
Drop unimplemented solveMCF and remnants of it.
1 parent c8fc234 commit 37e4945

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

bolt/include/bolt/Passes/MCF.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ namespace bolt {
1515
class BinaryFunction;
1616
class DataflowInfoManager;
1717

18-
enum MCFCostFunction : char {
19-
MCF_DISABLE = 0,
20-
MCF_LINEAR,
21-
MCF_QUADRATIC,
22-
MCF_LOG,
23-
MCF_BLAMEFTS
24-
};
25-
2618
/// Implement the idea in "SamplePGO - The Power of Profile Guided Optimizations
2719
/// without the Usability Burden" by Diego Novillo to make basic block counts
2820
/// equal if we show that A dominates B, B post-dominates A and they are in the
@@ -33,22 +25,6 @@ void equalizeBBCounts(DataflowInfoManager &Info, BinaryFunction &BF);
3325
/// we only have bb count.
3426
void estimateEdgeCounts(BinaryFunction &BF);
3527

36-
/// Entry point for computing a min-cost flow for the CFG with the goal
37-
/// of fixing the flow of the CFG edges, that is, making sure it obeys the
38-
/// flow-conservation equation SumInEdges = SumOutEdges.
39-
///
40-
/// To do this, we create an instance of the min-cost flow problem in a
41-
/// similar way as the one discussed in the work of Roy Levin "Completing
42-
/// Incomplete Edge Profile by Applying Minimum Cost Circulation Algorithms".
43-
/// We do a few things differently, though. We don't populate edge counts using
44-
/// weights coming from a static branch prediction technique and we don't
45-
/// use the same cost function.
46-
///
47-
/// If cost function BlameFTs is used, assign all remaining flow to
48-
/// fall-throughs. This is used when the sampling is based on taken branches
49-
/// that do not account for them.
50-
void solveMCF(BinaryFunction &BF, MCFCostFunction CostFunction);
51-
5228
} // end namespace bolt
5329
} // end namespace llvm
5430

bolt/lib/Passes/MCF.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,10 @@ namespace opts {
2929

3030
extern cl::OptionCategory BoltOptCategory;
3131

32-
extern cl::opt<bool> TimeOpts;
33-
3432
static cl::opt<bool> IterativeGuess(
3533
"iterative-guess",
3634
cl::desc("in non-LBR mode, guess edge counts using iterative technique"),
3735
cl::Hidden, cl::cat(BoltOptCategory));
38-
39-
static cl::opt<bool> UseRArcs(
40-
"mcf-use-rarcs",
41-
cl::desc("in MCF, consider the possibility of cancelling flow to balance "
42-
"edges"),
43-
cl::Hidden, cl::cat(BoltOptCategory));
44-
4536
} // namespace opts
4637

4738
namespace llvm {
@@ -462,9 +453,5 @@ void estimateEdgeCounts(BinaryFunction &BF) {
462453
recalculateBBCounts(BF, /*AllEdges=*/false);
463454
}
464455

465-
void solveMCF(BinaryFunction &BF, MCFCostFunction CostFunction) {
466-
llvm_unreachable("not implemented");
467-
}
468-
469456
} // namespace bolt
470457
} // namespace llvm

0 commit comments

Comments
 (0)