@@ -85,12 +85,6 @@ static cl::opt<int>
85
85
" multiple of TCC_Basic)" ));
86
86
87
87
namespace {
88
-
89
- // / A sequence of basic blocks.
90
- // /
91
- // / A 0-sized SmallVector is slightly cheaper to move than a std::vector.
92
- using BlockSequence = SmallVector<BasicBlock *, 0 >;
93
-
94
88
// Same as blockEndsInUnreachable in CodeGen/BranchFolding.cpp. Do not modify
95
89
// this function unless you modify the MBB version as well.
96
90
//
@@ -169,31 +163,6 @@ static bool markFunctionCold(Function &F, bool UpdateEntryCount = false) {
169
163
return Changed;
170
164
}
171
165
172
- class HotColdSplitting {
173
- public:
174
- HotColdSplitting (ProfileSummaryInfo *ProfSI,
175
- function_ref<BlockFrequencyInfo *(Function &)> GBFI,
176
- function_ref<TargetTransformInfo &(Function &)> GTTI,
177
- std::function<OptimizationRemarkEmitter &(Function &)> *GORE,
178
- function_ref<AssumptionCache *(Function &)> LAC)
179
- : PSI(ProfSI), GetBFI(GBFI), GetTTI(GTTI), GetORE(GORE), LookupAC(LAC) {}
180
- bool run (Module &M);
181
-
182
- private:
183
- bool isFunctionCold (const Function &F) const ;
184
- bool shouldOutlineFrom (const Function &F) const ;
185
- bool outlineColdRegions (Function &F, bool HasProfileSummary);
186
- Function *extractColdRegion (const BlockSequence &Region, DominatorTree &DT,
187
- BlockFrequencyInfo *BFI, TargetTransformInfo &TTI,
188
- OptimizationRemarkEmitter &ORE,
189
- AssumptionCache *AC, unsigned Count);
190
- ProfileSummaryInfo *PSI;
191
- function_ref<BlockFrequencyInfo *(Function &)> GetBFI;
192
- function_ref<TargetTransformInfo &(Function &)> GetTTI;
193
- std::function<OptimizationRemarkEmitter &(Function &)> *GetORE;
194
- function_ref<AssumptionCache *(Function &)> LookupAC;
195
- };
196
-
197
166
class HotColdSplittingLegacyPass : public ModulePass {
198
167
public:
199
168
static char ID;
0 commit comments