@@ -2287,67 +2287,6 @@ void Compilation::disableIncrementalBuild(Twine why) {
2287
2287
IncrementalComparator->WhyIncrementalWasDisabled = why.str ();
2288
2288
}
2289
2289
2290
- void Compilation::IncrementalSchemeComparator::update (
2291
- const CommandSet &jobsWithoutRanges, const CommandSet &jobsWithRanges) {
2292
- for (const auto *cmd : jobsWithoutRanges)
2293
- JobsWithoutRanges.insert (cmd);
2294
- for (const auto *cmd : jobsWithRanges)
2295
- JobsWithRanges.insert (cmd);
2296
-
2297
- if (!jobsWithoutRanges.empty ())
2298
- ++CompileStagesWithoutRanges;
2299
- if (!jobsWithRanges.empty ())
2300
- ++CompileStagesWithRanges;
2301
- }
2302
-
2303
- void Compilation::IncrementalSchemeComparator::outputComparison () const {
2304
- if (CompareIncrementalSchemesPath.empty ()) {
2305
- outputComparison (llvm::outs ());
2306
- return ;
2307
- }
2308
-
2309
- std::error_code EC;
2310
- using namespace llvm ::sys::fs;
2311
- llvm::raw_fd_ostream OS (CompareIncrementalSchemesPath, EC, CD_OpenAlways,
2312
- FA_Write, OF_Append | OF_Text);
2313
-
2314
- if (EC) {
2315
- Diags.diagnose (SourceLoc (), diag::unable_to_open_incremental_comparison_log,
2316
- CompareIncrementalSchemesPath);
2317
- return ;
2318
- }
2319
- outputComparison (OS);
2320
- }
2321
-
2322
- void Compilation::IncrementalSchemeComparator::outputComparison (
2323
- llvm::raw_ostream &out) const {
2324
- if (!EnableIncrementalBuildWhenConstructed) {
2325
- out << " *** Incremental build was not enabled in the command line ***\n " ;
2326
- return ;
2327
- }
2328
- if (!EnableIncrementalBuild) {
2329
- // No stats will have been gathered
2330
- assert (!WhyIncrementalWasDisabled.empty () && " Must be a reason" );
2331
- out << " *** Incremental build disabled because "
2332
- << WhyIncrementalWasDisabled << " , cannot compare ***\n " ;
2333
- return ;
2334
- }
2335
- unsigned countWithoutRanges = JobsWithoutRanges.size ();
2336
- unsigned countWithRanges = JobsWithRanges.size ();
2337
-
2338
- const int rangeBenefit = countWithoutRanges - countWithRanges;
2339
- const int rangeStageBenefit =
2340
- CompileStagesWithoutRanges - CompileStagesWithRanges;
2341
-
2342
- out << " *** "
2343
- << " Range benefit: " << rangeBenefit << " compilations, "
2344
- << rangeStageBenefit << " stages, "
2345
- << " without ranges: " << countWithoutRanges << " , "
2346
- << " with ranges: " << countWithRanges << " , "
2347
- << (EnableSourceRangeDependencies ? " used" : " did not use" ) << " ranges, "
2348
- << " total: " << SwiftInputCount << " ***\n " ;
2349
- }
2350
-
2351
2290
unsigned Compilation::countSwiftInputs () const {
2352
2291
unsigned inputCount = 0 ;
2353
2292
for (const auto &p : InputFilesWithTypes)
0 commit comments