24
24
#include " swift/Basic/OutputFileMap.h"
25
25
#include " swift/Basic/Statistic.h"
26
26
#include " swift/Driver/Driver.h"
27
- #include " swift/Driver/FineGrainedDependencyDriverGraph.h"
28
27
#include " swift/Driver/Job.h"
29
28
#include " swift/Driver/Util.h"
30
29
#include " llvm/ADT/StringRef.h"
@@ -84,10 +83,6 @@ class Compilation {
84
83
bool hadAbnormalExit;
85
84
// / The exit code of this driver process.
86
85
int exitCode;
87
- // / The dependency graph built up during the compilation of this module.
88
- // /
89
- // / This data is used for cross-module module dependencies.
90
- fine_grained_dependencies::ModuleDepGraph depGraph;
91
86
92
87
Result (const Result &) = delete ;
93
88
Result &operator =(const Result &) = delete ;
@@ -97,8 +92,7 @@ class Compilation {
97
92
98
93
// / Construct a \c Compilation::Result from just an exit code.
99
94
static Result code (int code) {
100
- return Compilation::Result{false , code,
101
- fine_grained_dependencies::ModuleDepGraph ()};
95
+ return Compilation::Result{false , code};
102
96
}
103
97
};
104
98
@@ -166,33 +160,10 @@ class Compilation {
166
160
// / These apply whether the compilation succeeds or fails. If the
167
161
llvm::StringMap<PreserveOnSignal> TempFilePaths;
168
162
169
- // / Write information about this compilation to this file.
170
- // /
171
- // / This is used for incremental builds.
172
- std::string CompilationRecordPath;
173
-
174
- // / A hash representing all the arguments that could trigger a full rebuild.
175
- std::string ArgsHash;
176
-
177
- // / When the build was started.
178
- // /
179
- // / This should be as close as possible to when the driver was invoked, since
180
- // / it's used as a lower bound.
181
- llvm::sys::TimePoint<> BuildStartTime;
182
-
183
- // / The time of the last build.
184
- // /
185
- // / If unknown, this will be some time in the past.
186
- llvm::sys::TimePoint<> LastBuildTime = llvm::sys::TimePoint<>::min();
187
-
188
163
// / Indicates whether this Compilation should continue execution of subtasks
189
164
// / even if they returned an error status.
190
165
bool ContinueBuildingAfterErrors = false ;
191
166
192
- // / Indicates whether tasks should only be executed if their output is out
193
- // / of date.
194
- bool EnableIncrementalBuild;
195
-
196
167
// / Indicates whether groups of parallel frontend jobs should be merged
197
168
// / together and run in composite "batch jobs" when possible, to reduce
198
169
// / redundant work.
@@ -251,17 +222,6 @@ class Compilation {
251
222
// / -disable-only-one-dependency-file on the command line.
252
223
const bool OnlyOneDependencyFile;
253
224
254
- private:
255
- // / Helpful for debugging, but slows down the driver. So, only turn on when
256
- // / needed.
257
- const bool VerifyFineGrainedDependencyGraphAfterEveryImport;
258
- // / Helpful for debugging, but slows down the driver. So, only turn on when
259
- // / needed.
260
- const bool EmitFineGrainedDependencyDotFileAfterEveryImport;
261
-
262
- // / (experimental) Enable cross-module incremental build scheduling.
263
- const bool EnableCrossModuleIncrementalBuild;
264
-
265
225
private:
266
226
template <typename T>
267
227
static T *unwrap (const std::unique_ptr<T> &p) {
@@ -280,22 +240,15 @@ class Compilation {
280
240
std::unique_ptr<llvm::opt::InputArgList> InputArgs,
281
241
std::unique_ptr<llvm::opt::DerivedArgList> TranslatedArgs,
282
242
InputFileList InputsWithTypes,
283
- std::string CompilationRecordPath,
284
- StringRef ArgsHash, llvm::sys::TimePoint<> StartTime,
285
- llvm::sys::TimePoint<> LastBuildTime,
286
243
size_t FilelistThreshold,
287
- bool EnableIncrementalBuild = false ,
288
244
bool EnableBatchMode = false ,
289
245
unsigned BatchSeed = 0 ,
290
246
Optional<unsigned > BatchCount = None,
291
247
Optional<unsigned > BatchSizeLimit = None,
292
248
bool SaveTemps = false ,
293
249
bool ShowDriverTimeCompilation = false ,
294
250
std::unique_ptr<UnifiedStatsReporter> Stats = nullptr ,
295
- bool OnlyOneDependencyFile = false ,
296
- bool VerifyFineGrainedDependencyGraphAfterEveryImport = false ,
297
- bool EmitFineGrainedDependencyDotFileAfterEveryImport = false ,
298
- bool EnableCrossModuleIncrementalBuild = false );
251
+ bool OnlyOneDependencyFile = false );
299
252
// clang-format on
300
253
~Compilation ();
301
254
@@ -348,19 +301,6 @@ class Compilation {
348
301
return DerivedOutputFileMap;
349
302
}
350
303
351
- bool getIncrementalBuildEnabled () const {
352
- return EnableIncrementalBuild;
353
- }
354
- void disableIncrementalBuild (Twine why);
355
-
356
- bool getVerifyFineGrainedDependencyGraphAfterEveryImport () const {
357
- return VerifyFineGrainedDependencyGraphAfterEveryImport;
358
- }
359
-
360
- bool getEmitFineGrainedDependencyDotFileAfterEveryImport () const {
361
- return EmitFineGrainedDependencyDotFileAfterEveryImport;
362
- }
363
-
364
304
bool getBatchModeEnabled () const {
365
305
return EnableBatchMode;
366
306
}
@@ -372,13 +312,6 @@ class Compilation {
372
312
ContinueBuildingAfterErrors = Value;
373
313
}
374
314
375
- bool getShowIncrementalBuildDecisions () const {
376
- return ShowIncrementalBuildDecisions;
377
- }
378
- void setShowIncrementalBuildDecisions (bool value = true ) {
379
- ShowIncrementalBuildDecisions = value;
380
- }
381
-
382
315
bool getShowJobLifecycle () const {
383
316
return ShowJobLifecycle;
384
317
}
@@ -390,10 +323,6 @@ class Compilation {
390
323
return ShowDriverTimeCompilation;
391
324
}
392
325
393
- bool getEnableCrossModuleIncrementalBuild () const {
394
- return EnableCrossModuleIncrementalBuild;
395
- }
396
-
397
326
size_t getFilelistThreshold () const {
398
327
return FilelistThreshold;
399
328
}
@@ -415,7 +344,7 @@ class Compilation {
415
344
// / True if extra work has to be done when tracing through the dependency
416
345
// / graph, either in order to print dependencies or to collect statistics.
417
346
bool getTraceDependencies () const {
418
- return getShowIncrementalBuildDecisions () || getStatsReporter ();
347
+ return getStatsReporter ();
419
348
}
420
349
421
350
OutputLevel getOutputLevel () const {
@@ -426,10 +355,6 @@ class Compilation {
426
355
return BatchSeed;
427
356
}
428
357
429
- llvm::sys::TimePoint<> getLastBuildTime () const {
430
- return LastBuildTime;
431
- }
432
-
433
358
Optional<unsigned > getBatchCount () const {
434
359
return BatchCount;
435
360
}
@@ -447,17 +372,6 @@ class Compilation {
447
372
// / \sa types::isPartOfSwiftCompilation
448
373
const char *getAllSourcesPath () const ;
449
374
450
- // / Retrieve the path to the external swift deps file.
451
- // /
452
- // / For cross-module incremental builds, this file contains the dependencies
453
- // / from all the modules integrated over the prior build.
454
- // /
455
- // / Currently this patch is relative to the build record, but we may want
456
- // / to allow the output file map to customize this at some point.
457
- std::string getExternalSwiftDepsFilePath () const {
458
- return CompilationRecordPath + " .external" ;
459
- }
460
-
461
375
// / Asks the Compilation to perform the Jobs which it knows about.
462
376
// /
463
377
// / \param TQ The TaskQueue used to schedule jobs for execution.
0 commit comments