Skip to content

Commit 8dc04c7

Browse files
author
David Ungar
committed
Rename DependencyGraph and DependencyGraphImp with CoarseGrained prefix.
1 parent 2ff5855 commit 8dc04c7

File tree

4 files changed

+82
-82
lines changed

4 files changed

+82
-82
lines changed

include/swift/Driver/CoarseGrainedDependencyGraph.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ namespace swift {
3636

3737
class UnifiedStatsReporter;
3838

39-
/// The non-templated implementation of DependencyGraph.
39+
/// The non-templated implementation of CoarseGrainedDependencyGraph.
4040
///
41-
/// \see DependencyGraph
41+
/// \see CoarseGrainedDependencyGraph
4242
class CoarseGrainedDependencyGraphImpl {
4343
public:
4444
/// Possible dependency kinds.
4545
///
46-
/// Clients of DependencyGraph should have no reason to use this type.
46+
/// Clients of CoarseGrainedDependencyGraph should have no reason to use this type.
4747
/// It is only used in the implementation.
4848
enum class DependencyKind : uint8_t;
4949

@@ -62,9 +62,9 @@ class CoarseGrainedDependencyGraphImpl {
6262
AffectsDownstream
6363
};
6464

65-
/// The non-templated implementation of DependencyGraph::MarkTracer.
65+
/// The non-templated implementation of CoarseGrainedDependencyGraph::MarkTracer.
6666
///
67-
/// \see DependencyGraph::MarkTracer
67+
/// \see CoarseGrainedDependencyGraph::MarkTracer
6868
class MarkTracerImpl {
6969
class Entry;
7070
llvm::DenseMap<const void *, SmallVector<Entry, 4>> Table;
@@ -154,7 +154,7 @@ class CoarseGrainedDependencyGraphImpl {
154154
(void)newlyInserted;
155155
}
156156

157-
/// See DependencyGraph::markTransitive.
157+
/// See CoarseGrainedDependencyGraph::markTransitive.
158158

159159
void markTransitive(SmallVectorImpl<const void *> &visited,
160160
const void *node, MarkTracerImpl *tracer = nullptr);
@@ -196,7 +196,7 @@ class CoarseGrainedDependencyGraphImpl {
196196
/// The graph also supports a "mark" operation, which is intended to track
197197
/// nodes that have been not just visited but transitively marked through.
198198
template <typename T>
199-
class DependencyGraph : public CoarseGrainedDependencyGraphImpl {
199+
class CoarseGrainedDependencyGraph : public CoarseGrainedDependencyGraphImpl {
200200
using Traits = llvm::PointerLikeTypeTraits<T>;
201201
static_assert(Traits::NumLowBitsAvailable >= 0, "not a pointer-like type");
202202

@@ -210,7 +210,7 @@ class DependencyGraph : public CoarseGrainedDependencyGraphImpl {
210210
}
211211

212212
public:
213-
/// Traces the graph traversal performed in DependencyGraph::markTransitive.
213+
/// Traces the graph traversal performed in CoarseGrainedDependencyGraph::markTransitive.
214214
///
215215
/// This is intended to be a debugging aid.
216216
class MarkTracer : public MarkTracerImpl {

include/swift/Driver/FineGrainedDependencyDriverGraph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class ModuleDepGraph {
267267
assert(verify() && "ModuleDepGraph should be fine when created");
268268
}
269269

270-
/// Unlike the standard \c DependencyGraph, returns \c
270+
/// Unlike the standard \c CoarseGrainedDependencyGraph, returns \c
271271
/// CoarseGrainedDependencyGraphImpl::LoadResult::AffectsDownstream when loading a new
272272
/// file, i.e. when determining the initial set. Caller compensates.
273273
CoarseGrainedDependencyGraphImpl::LoadResult loadFromPath(const driver::Job *, StringRef,

lib/Driver/Compilation.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -239,17 +239,17 @@ namespace driver {
239239
///
240240
/// Dependency graphs for deciding which jobs are dirty (need running)
241241
/// or clean (can be skipped).
242-
using DependencyGraph = DependencyGraph<const Job *>;
243-
DependencyGraph StandardDepGraph;
244-
DependencyGraph StandardDepGraphForRanges;
242+
using CoarseGrainedDependencyGraph = CoarseGrainedDependencyGraph<const Job *>;
243+
CoarseGrainedDependencyGraph CoarseGrainedDepGraph;
244+
CoarseGrainedDependencyGraph CoarseGrainedDepGraphForRanges;
245245

246246
fine_grained_dependencies::ModuleDepGraph ExpDepGraph;
247247
fine_grained_dependencies::ModuleDepGraph ExpDepGraphForRanges;
248248

249249
private:
250250
/// Helper for tracing the propagation of marks in the graph.
251-
DependencyGraph::MarkTracer ActualIncrementalTracer;
252-
DependencyGraph::MarkTracer *IncrementalTracer = nullptr;
251+
CoarseGrainedDependencyGraph::MarkTracer ActualIncrementalTracer;
252+
CoarseGrainedDependencyGraph::MarkTracer *IncrementalTracer = nullptr;
253253

254254
/// TaskQueue for execution.
255255
std::unique_ptr<TaskQueue> TQ;
@@ -1063,7 +1063,7 @@ namespace driver {
10631063
// start nodes in the "Always" condition from the start instead of
10641064
// using markIntransitive and having later functions call
10651065
// markTransitive. That way markIntransitive would be an
1066-
// implementation detail of DependencyGraph.
1066+
// implementation detail of CoarseGrainedDependencyGraph.
10671067
markIntransitiveInDepGraph(Cmd, forRanges);
10681068
}
10691069
LLVM_FALLTHROUGH;
@@ -1586,7 +1586,7 @@ namespace driver {
15861586
: getDepGraph(forRanges).markIntransitive(Cmd);
15871587
}
15881588

1589-
DependencyGraph::LoadResult loadDepGraphFromPath(const Job *Cmd,
1589+
CoarseGrainedDependencyGraph::LoadResult loadDepGraphFromPath(const Job *Cmd,
15901590
StringRef path,
15911591
DiagnosticEngine &diags,
15921592
const bool forRanges) {
@@ -1599,7 +1599,7 @@ namespace driver {
15991599
void
16001600
markTransitiveInDepGraph(SmallVector<const Job *, N> &visited,
16011601
const Job *Cmd, const bool forRanges,
1602-
DependencyGraph::MarkTracer *tracer = nullptr) {
1602+
CoarseGrainedDependencyGraph::MarkTracer *tracer = nullptr) {
16031603
if (Comp.getEnableFineGrainedDependencies())
16041604
getExpDepGraph(forRanges).markTransitive(visited, Cmd, tracer);
16051605
else
@@ -1617,15 +1617,15 @@ namespace driver {
16171617
getExpDepGraph(const bool forRanges) {
16181618
return forRanges ? ExpDepGraphForRanges : ExpDepGraph;
16191619
}
1620-
DependencyGraph &getDepGraph(const bool forRanges) {
1621-
return forRanges ? StandardDepGraphForRanges : StandardDepGraph;
1620+
CoarseGrainedDependencyGraph &getDepGraph(const bool forRanges) {
1621+
return forRanges ? CoarseGrainedDepGraphForRanges : CoarseGrainedDepGraph;
16221622
}
16231623
const fine_grained_dependencies::ModuleDepGraph &
16241624
getExpDepGraph(const bool forRanges) const {
16251625
return forRanges ? ExpDepGraphForRanges : ExpDepGraph;
16261626
}
1627-
const DependencyGraph &getDepGraph(const bool forRanges) const {
1628-
return forRanges ? StandardDepGraphForRanges : StandardDepGraph;
1627+
const CoarseGrainedDependencyGraph &getDepGraph(const bool forRanges) const {
1628+
return forRanges ? CoarseGrainedDepGraphForRanges : CoarseGrainedDepGraph;
16291629
}
16301630
};
16311631
} // namespace driver

0 commit comments

Comments
 (0)