@@ -155,14 +155,7 @@ Compilation::Compilation(DiagnosticEngine &Diags,
155155 EmitFineGrainedDependencyDotFileAfterEveryImport),
156156 EnableSourceRangeDependencies(EnableSourceRangeDependencies),
157157 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+ { };
166159// clang-format on
167160
168161static bool writeFilelistIfNecessary (const Job *job, const ArgList &args,
@@ -307,32 +300,16 @@ namespace driver {
307300 DriverTimers;
308301
309302 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 {
312304 if (!Comp.getShowIncrementalBuildDecisions ())
313305 return ;
314306 if (ScheduledCommands.count (cmd))
315307 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);
331308 }
332309
333310 template <typename JobsCollection>
334311 void noteBuildingJobs (const JobsCollection &unsortedJobsArg,
335- const bool forRanges, const StringRef reason) const {
312+ const StringRef reason) const {
336313 if (!Comp.getShowIncrementalBuildDecisions () &&
337314 !Comp.getShowJobLifecycle ())
338315 return ;
@@ -343,8 +320,7 @@ namespace driver {
343320 llvm::SmallVector<const Job *, 16 > sortedJobs;
344321 Comp.sortJobsToMatchCompilationInputs (unsortedJobs, sortedJobs);
345322 for (const Job *j : sortedJobs)
346- noteBuilding (j, /* willBeBuilding=*/ true , /* isTentative=*/ false ,
347- forRanges, reason);
323+ noteBuilding (j, /* willBeBuilding=*/ true , /* isTentative=*/ false , reason);
348324 }
349325
350326 const Job *findUnfinishedJob (ArrayRef<const Job *> JL) {
@@ -707,39 +683,9 @@ namespace driver {
707683 return unpackAndFinishBatch (ReturnCode, Output, Errors,
708684 static_cast <const BatchJob *>(FinishedCmd));
709685 }
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 );
721686
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 );
743689
744690 if (ReturnCode != EXIT_SUCCESS)
745691 return taskFailed (FinishedCmd, ReturnCode);
@@ -748,10 +694,6 @@ namespace driver {
748694 // might have been blocked.
749695 markFinished (FinishedCmd);
750696
751- const CommandSet &DependentsInEffect = useRangesForScheduling
752- ? DependentsWithRanges
753- : DependentsWithoutRanges;
754-
755697 noteBuildingJobs (DependentsInEffect, useRangesForScheduling,
756698 " because of dependencies discovered later" );
757699
@@ -949,22 +891,7 @@ namespace driver {
949891 // / Figure out the best strategy and return those jobs. May return
950892 // / duplicates.
951893 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 );
968895 }
969896
970897 // / Return jobs to run if using dependencies, may include duplicates.
@@ -2243,9 +2170,6 @@ Compilation::Result Compilation::performJobs(std::unique_ptr<TaskQueue> &&TQ) {
22432170
22442171 auto result = performJobsImpl (std::move (TQ));
22452172
2246- if (IncrementalComparator)
2247- IncrementalComparator->outputComparison ();
2248-
22492173 if (!SaveTemps) {
22502174 for (const auto &pathPair : TempFilePaths) {
22512175 if (!result.hadAbnormalExit || pathPair.getValue () == PreserveOnSignal::No)
@@ -2283,8 +2207,6 @@ void Compilation::disableIncrementalBuild(Twine why) {
22832207 llvm::outs () << " Disabling incremental build: " << why << " \n " ;
22842208
22852209 EnableIncrementalBuild = false ;
2286- if (IncrementalComparator)
2287- IncrementalComparator->WhyIncrementalWasDisabled = why.str ();
22882210}
22892211
22902212unsigned Compilation::countSwiftInputs () const {
0 commit comments