@@ -155,14 +155,7 @@ Compilation::Compilation(DiagnosticEngine &Diags,
155
155
EmitFineGrainedDependencyDotFileAfterEveryImport),
156
156
EnableSourceRangeDependencies(EnableSourceRangeDependencies),
157
157
EnableCrossModuleIncrementalBuild(EnableCrossModuleIncrementalBuild)
158
- {
159
- if (CompareIncrementalSchemes)
160
- IncrementalComparator.emplace (
161
- // Ensure the references are to inst vars, NOT arguments
162
- this ->EnableIncrementalBuild ,
163
- EnableSourceRangeDependencies,
164
- CompareIncrementalSchemesPath, countSwiftInputs (), getDiags ());
165
- };
158
+ { };
166
159
// clang-format on
167
160
168
161
static bool writeFilelistIfNecessary (const Job *job, const ArgList &args,
@@ -307,32 +300,16 @@ namespace driver {
307
300
DriverTimers;
308
301
309
302
void noteBuilding (const Job *cmd, const bool willBeBuilding,
310
- const bool isTentative, const bool forRanges,
311
- StringRef reason) const {
303
+ const bool isTentative, StringRef reason) const {
312
304
if (!Comp.getShowIncrementalBuildDecisions ())
313
305
return ;
314
306
if (ScheduledCommands.count (cmd))
315
307
return ;
316
- if (!Comp.getEnableSourceRangeDependencies () &&
317
- !Comp.IncrementalComparator && !willBeBuilding)
318
- return ; // preserve legacy behavior
319
- const bool isHypothetical =
320
- Comp.getEnableSourceRangeDependencies () != forRanges;
321
- llvm::outs () << (isHypothetical ? " Hypothetically: " : " " )
322
- << (isTentative ? " (tentatively) " : " " )
323
- << (willBeBuilding ? " Queuing " : " Skipping " )
324
- << (forRanges ? " <With ranges> "
325
- : Comp.getEnableSourceRangeDependencies ()
326
- ? " <Without ranges> "
327
- : " " )
328
- << reason << " : " << LogJob (cmd) << " \n " ;
329
-
330
- getFineGrainedDepGraph (forRanges).printPath (llvm::outs (), cmd);
331
308
}
332
309
333
310
template <typename JobsCollection>
334
311
void noteBuildingJobs (const JobsCollection &unsortedJobsArg,
335
- const bool forRanges, const StringRef reason) const {
312
+ const StringRef reason) const {
336
313
if (!Comp.getShowIncrementalBuildDecisions () &&
337
314
!Comp.getShowJobLifecycle ())
338
315
return ;
@@ -343,8 +320,7 @@ namespace driver {
343
320
llvm::SmallVector<const Job *, 16 > sortedJobs;
344
321
Comp.sortJobsToMatchCompilationInputs (unsortedJobs, sortedJobs);
345
322
for (const Job *j : sortedJobs)
346
- noteBuilding (j, /* willBeBuilding=*/ true , /* isTentative=*/ false ,
347
- forRanges, reason);
323
+ noteBuilding (j, /* willBeBuilding=*/ true , /* isTentative=*/ false , reason);
348
324
}
349
325
350
326
const Job *findUnfinishedJob (ArrayRef<const Job *> JL) {
@@ -707,39 +683,9 @@ namespace driver {
707
683
return unpackAndFinishBatch (ReturnCode, Output, Errors,
708
684
static_cast <const BatchJob *>(FinishedCmd));
709
685
}
710
- const bool useRangesForScheduling =
711
- Comp.getEnableSourceRangeDependencies ();
712
- const bool isComparing = Comp.IncrementalComparator .hasValue ();
713
-
714
- CommandSet DependentsWithoutRanges, DependentsWithRanges;
715
- if (useRangesForScheduling || isComparing)
716
- DependentsWithRanges =
717
- subsequentJobsNeeded (FinishedCmd, ReturnCode, /* forRanges=*/ true );
718
- if (!useRangesForScheduling || isComparing)
719
- DependentsWithoutRanges =
720
- subsequentJobsNeeded (FinishedCmd, ReturnCode, /* forRanges=*/ false );
721
686
722
- if (isComparing)
723
- Comp.IncrementalComparator ->update (DependentsWithoutRanges,
724
- DependentsWithRanges);
725
-
726
- if (Comp.getShowIncrementalBuildDecisions () && isComparing &&
727
- useRangesForScheduling &&
728
- (!DependentsWithoutRanges.empty () || !DependentsWithRanges.empty ())) {
729
- llvm::outs () << " \n After completion of " << LogJob (FinishedCmd)
730
- << " : \n " ;
731
- for (auto const *Cmd : DependentsWithoutRanges)
732
- llvm::outs () << " - Dependencies would now schedule: " << LogJob (Cmd)
733
- << " \n " ;
734
- for (auto const *Cmd : DependentsWithRanges)
735
- llvm::outs () << " - Source ranges will now schedule: " << LogJob (Cmd)
736
- << " \n " ;
737
- if (DependentsWithoutRanges.size () > 1 ||
738
- DependentsWithRanges.size () > 1 )
739
- llvm::outs () << " For an additional " << DependentsWithoutRanges.size ()
740
- << " (deps) vs " << DependentsWithRanges.size ()
741
- << " (ranges)\n " ;
742
- }
687
+ CommandSet DependentsInEffect =
688
+ subsequentJobsNeeded (FinishedCmd, ReturnCode, /* forRanges=*/ false );
743
689
744
690
if (ReturnCode != EXIT_SUCCESS)
745
691
return taskFailed (FinishedCmd, ReturnCode);
@@ -748,10 +694,6 @@ namespace driver {
748
694
// might have been blocked.
749
695
markFinished (FinishedCmd);
750
696
751
- const CommandSet &DependentsInEffect = useRangesForScheduling
752
- ? DependentsWithRanges
753
- : DependentsWithoutRanges;
754
-
755
697
noteBuildingJobs (DependentsInEffect, useRangesForScheduling,
756
698
" because of dependencies discovered later" );
757
699
@@ -949,22 +891,7 @@ namespace driver {
949
891
// / Figure out the best strategy and return those jobs. May return
950
892
// / duplicates.
951
893
CommandSet computeFirstRoundCompileJobsForIncrementalCompilation () {
952
- const bool useRangesForScheduling =
953
- Comp.getEnableSourceRangeDependencies ();
954
- const bool isComparing = Comp.IncrementalComparator .hasValue ();
955
-
956
- CommandSet jobsWithRanges, jobsWithoutRanges;
957
- if (useRangesForScheduling || isComparing)
958
- jobsWithRanges =
959
- computeDependenciesAndGetNeededCompileJobs (/* useRanges=*/ true );
960
- if (!useRangesForScheduling || isComparing)
961
- jobsWithoutRanges =
962
- computeDependenciesAndGetNeededCompileJobs (/* useRanges=*/ false );
963
-
964
- if (isComparing)
965
- Comp.IncrementalComparator ->update (jobsWithoutRanges, jobsWithRanges);
966
-
967
- return useRangesForScheduling ? jobsWithRanges : jobsWithoutRanges;
894
+ return computeDependenciesAndGetNeededCompileJobs (/* useRanges=*/ false );
968
895
}
969
896
970
897
// / Return jobs to run if using dependencies, may include duplicates.
@@ -2243,9 +2170,6 @@ Compilation::Result Compilation::performJobs(std::unique_ptr<TaskQueue> &&TQ) {
2243
2170
2244
2171
auto result = performJobsImpl (std::move (TQ));
2245
2172
2246
- if (IncrementalComparator)
2247
- IncrementalComparator->outputComparison ();
2248
-
2249
2173
if (!SaveTemps) {
2250
2174
for (const auto &pathPair : TempFilePaths) {
2251
2175
if (!result.hadAbnormalExit || pathPair.getValue () == PreserveOnSignal::No)
@@ -2283,8 +2207,6 @@ void Compilation::disableIncrementalBuild(Twine why) {
2283
2207
llvm::outs () << " Disabling incremental build: " << why << " \n " ;
2284
2208
2285
2209
EnableIncrementalBuild = false ;
2286
- if (IncrementalComparator)
2287
- IncrementalComparator->WhyIncrementalWasDisabled = why.str ();
2288
2210
}
2289
2211
2290
2212
unsigned Compilation::countSwiftInputs () const {
0 commit comments