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,15 +83,9 @@ 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
- Result (bool hadAbnormalExit, int exitCode,
93
- fine_grained_dependencies::ModuleDepGraph depGraph)
94
- : hadAbnormalExit(hadAbnormalExit), exitCode(exitCode),
95
- depGraph (depGraph) {}
87
+ Result (bool hadAbnormalExit, int exitCode)
88
+ : hadAbnormalExit(hadAbnormalExit), exitCode(exitCode) {}
96
89
97
90
Result (const Result &) = delete ;
98
91
Result &operator =(const Result &) = delete ;
@@ -102,8 +95,7 @@ class Compilation {
102
95
103
96
// / Construct a \c Compilation::Result from just an exit code.
104
97
static Result code (int code) {
105
- return Compilation::Result{false , code,
106
- fine_grained_dependencies::ModuleDepGraph ()};
98
+ return Compilation::Result{false , code};
107
99
}
108
100
};
109
101
@@ -171,33 +163,10 @@ class Compilation {
171
163
// / These apply whether the compilation succeeds or fails. If the
172
164
llvm::StringMap<PreserveOnSignal> TempFilePaths;
173
165
174
- // / Write information about this compilation to this file.
175
- // /
176
- // / This is used for incremental builds.
177
- std::string CompilationRecordPath;
178
-
179
- // / A hash representing all the arguments that could trigger a full rebuild.
180
- std::string ArgsHash;
181
-
182
- // / When the build was started.
183
- // /
184
- // / This should be as close as possible to when the driver was invoked, since
185
- // / it's used as a lower bound.
186
- llvm::sys::TimePoint<> BuildStartTime;
187
-
188
- // / The time of the last build.
189
- // /
190
- // / If unknown, this will be some time in the past.
191
- llvm::sys::TimePoint<> LastBuildTime = llvm::sys::TimePoint<>::min();
192
-
193
166
// / Indicates whether this Compilation should continue execution of subtasks
194
167
// / even if they returned an error status.
195
168
bool ContinueBuildingAfterErrors = false ;
196
169
197
- // / Indicates whether tasks should only be executed if their output is out
198
- // / of date.
199
- bool EnableIncrementalBuild;
200
-
201
170
// / Indicates whether groups of parallel frontend jobs should be merged
202
171
// / together and run in composite "batch jobs" when possible, to reduce
203
172
// / redundant work.
@@ -256,17 +225,6 @@ class Compilation {
256
225
// / -disable-only-one-dependency-file on the command line.
257
226
const bool OnlyOneDependencyFile;
258
227
259
- private:
260
- // / Helpful for debugging, but slows down the driver. So, only turn on when
261
- // / needed.
262
- const bool VerifyFineGrainedDependencyGraphAfterEveryImport;
263
- // / Helpful for debugging, but slows down the driver. So, only turn on when
264
- // / needed.
265
- const bool EmitFineGrainedDependencyDotFileAfterEveryImport;
266
-
267
- // / (experimental) Enable cross-module incremental build scheduling.
268
- const bool EnableCrossModuleIncrementalBuild;
269
-
270
228
private:
271
229
template <typename T>
272
230
static T *unwrap (const std::unique_ptr<T> &p) {
@@ -285,22 +243,15 @@ class Compilation {
285
243
std::unique_ptr<llvm::opt::InputArgList> InputArgs,
286
244
std::unique_ptr<llvm::opt::DerivedArgList> TranslatedArgs,
287
245
InputFileList InputsWithTypes,
288
- std::string CompilationRecordPath,
289
- StringRef ArgsHash, llvm::sys::TimePoint<> StartTime,
290
- llvm::sys::TimePoint<> LastBuildTime,
291
246
size_t FilelistThreshold,
292
- bool EnableIncrementalBuild = false ,
293
247
bool EnableBatchMode = false ,
294
248
unsigned BatchSeed = 0 ,
295
249
llvm::Optional<unsigned > BatchCount = llvm::None,
296
250
llvm::Optional<unsigned > BatchSizeLimit = llvm::None,
297
251
bool SaveTemps = false ,
298
252
bool ShowDriverTimeCompilation = false ,
299
253
std::unique_ptr<UnifiedStatsReporter> Stats = nullptr ,
300
- bool OnlyOneDependencyFile = false ,
301
- bool VerifyFineGrainedDependencyGraphAfterEveryImport = false ,
302
- bool EmitFineGrainedDependencyDotFileAfterEveryImport = false ,
303
- bool EnableCrossModuleIncrementalBuild = false );
254
+ bool OnlyOneDependencyFile = false );
304
255
// clang-format on
305
256
~Compilation ();
306
257
@@ -353,19 +304,6 @@ class Compilation {
353
304
return DerivedOutputFileMap;
354
305
}
355
306
356
- bool getIncrementalBuildEnabled () const {
357
- return EnableIncrementalBuild;
358
- }
359
- void disableIncrementalBuild (Twine why);
360
-
361
- bool getVerifyFineGrainedDependencyGraphAfterEveryImport () const {
362
- return VerifyFineGrainedDependencyGraphAfterEveryImport;
363
- }
364
-
365
- bool getEmitFineGrainedDependencyDotFileAfterEveryImport () const {
366
- return EmitFineGrainedDependencyDotFileAfterEveryImport;
367
- }
368
-
369
307
bool getBatchModeEnabled () const {
370
308
return EnableBatchMode;
371
309
}
@@ -377,13 +315,6 @@ class Compilation {
377
315
ContinueBuildingAfterErrors = Value;
378
316
}
379
317
380
- bool getShowIncrementalBuildDecisions () const {
381
- return ShowIncrementalBuildDecisions;
382
- }
383
- void setShowIncrementalBuildDecisions (bool value = true ) {
384
- ShowIncrementalBuildDecisions = value;
385
- }
386
-
387
318
bool getShowJobLifecycle () const {
388
319
return ShowJobLifecycle;
389
320
}
@@ -395,10 +326,6 @@ class Compilation {
395
326
return ShowDriverTimeCompilation;
396
327
}
397
328
398
- bool getEnableCrossModuleIncrementalBuild () const {
399
- return EnableCrossModuleIncrementalBuild;
400
- }
401
-
402
329
size_t getFilelistThreshold () const {
403
330
return FilelistThreshold;
404
331
}
@@ -420,7 +347,7 @@ class Compilation {
420
347
// / True if extra work has to be done when tracing through the dependency
421
348
// / graph, either in order to print dependencies or to collect statistics.
422
349
bool getTraceDependencies () const {
423
- return getShowIncrementalBuildDecisions () || getStatsReporter ();
350
+ return getStatsReporter ();
424
351
}
425
352
426
353
OutputLevel getOutputLevel () const {
@@ -431,12 +358,10 @@ class Compilation {
431
358
return BatchSeed;
432
359
}
433
360
434
- llvm::sys::TimePoint<> getLastBuildTime () const {
435
- return LastBuildTime ;
361
+ llvm::Optional< unsigned > getBatchCount () const {
362
+ return BatchCount ;
436
363
}
437
364
438
- llvm::Optional<unsigned > getBatchCount () const { return BatchCount; }
439
-
440
365
llvm::Optional<unsigned > getBatchSizeLimit () const { return BatchSizeLimit; }
441
366
442
367
// / Requests the path to a file containing all input source files. This can
@@ -448,17 +373,6 @@ class Compilation {
448
373
// / \sa types::isPartOfSwiftCompilation
449
374
const char *getAllSourcesPath () const ;
450
375
451
- // / Retrieve the path to the external swift deps file.
452
- // /
453
- // / For cross-module incremental builds, this file contains the dependencies
454
- // / from all the modules integrated over the prior build.
455
- // /
456
- // / Currently this patch is relative to the build record, but we may want
457
- // / to allow the output file map to customize this at some point.
458
- std::string getExternalSwiftDepsFilePath () const {
459
- return CompilationRecordPath + " .external" ;
460
- }
461
-
462
376
// / Asks the Compilation to perform the Jobs which it knows about.
463
377
// /
464
378
// / \param TQ The TaskQueue used to schedule jobs for execution.
0 commit comments