[llvm] [BOLT] Add structure of CDSplit to SplitFunctions (PR #73430)
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 29 11:43:51 PST 2023
================
@@ -136,6 +149,55 @@ struct SplitProfile2 final : public SplitStrategy {
}
};
+struct SplitCacheDirected final : public SplitStrategy {
+ BinaryContext &BC;
+ using BasicBlockOrder = BinaryFunction::BasicBlockOrderType;
+
+ explicit SplitCacheDirected(BinaryContext &BC) : BC(BC) {}
+
+ bool canSplit(const BinaryFunction &BF) override {
+ return BF.hasValidProfile() && hasFullProfile(BF) && !allBlocksCold(BF);
+ }
+
+ bool keepEmpty() override { return true; }
----------------
maksfb wrote:
`bool compactFragments() override { return false; }`?
https://github.com/llvm/llvm-project/pull/73430
More information about the llvm-commits
mailing list