Commit Graph

231 Commits

Author SHA1 Message Date
David Ungar
9bfed89e8c markTransitive & markExternal return the jobs, unfmt 2019-12-08 11:15:51 -08:00
David Ungar
0771d96986 Format 2019-12-08 10:14:24 -08:00
David Ungar
ebb77e8ee8 ExpDepGraph -> FineGrainedDepGraph 2019-12-08 09:44:47 -08:00
David Ungar
86a76cb2ea Merge pull request #28566 from davidungar/renaming-dependencies-2
Rename older dependency graph to "CoarseGrainedDependencyGraph"
2019-12-05 09:35:33 -08:00
Daniel Rodríguez Troitiño
5a6343f6f4 Merge pull request #28561 from compnerd/spectre-humanised
Driver: fix the Windows build after #28543
2019-12-04 12:22:07 -08:00
David Ungar
bc068ae68e format 2019-12-04 10:51:18 -08:00
David Ungar
8dc04c7912 Rename DependencyGraph and DependencyGraphImp with CoarseGrained prefix. 2019-12-04 10:51:18 -08:00
David Ungar
2ff5855c63 Rename DependencyGraphImpl -> CoarseGrainedDependencyGraphImpl, unformatted 2019-12-04 10:51:18 -08:00
David Ungar
200b181eb3 Renaming files -> CoarseGrained 2019-12-04 10:51:18 -08:00
Saleem Abdulrasool
ed4fe81129 Driver: fix the Windows build after #28543
Repair the VS2017 build after #28543.  It would fail to convert the
dependency set's keys into a vector of StringRefs:

```
error C2678: binary '*': no operator found which takes a left-hand operand of type 'const _Iter' (or there is no acceptable conversion)
        with [
            _Iter=llvm::StringMapKeyIterator<char>
        ]
C:\agent\_work\2\s\toolchain\llvm\include\llvm/ADT/StringMap.h(549): note: could be 'llvm::StringRef &llvm::StringMapKeyIterator<ValueTy>::operator *(void)'
        with
        [
            ValueTy=char
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\\include\xmemory(217): note: while trying to match the argument list '(const _Iter)'
        with
        [
            _Iter=llvm::StringMapKeyIterator<char>
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\\include\vector(1823): note: see reference to function template instantiation '_FwdIt *std::_Uninitialized_copy<_Iter,llvm::StringRef*,std::allocator<_Ty>>(const _InIt,const _InIt,_FwdIt,_Alloc &)' being compiled
        with
        [
            _FwdIt=llvm::StringRef *,
            _Iter=llvm::StringMapKeyIterator<char>,
            _Ty=llvm::StringRef,
            _InIt=llvm::StringMapKeyIterator<char>,
            _Alloc=std::allocator<llvm::StringRef>
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\\include\vector(708): note: see reference to function template instantiation 'llvm::StringRef *std::vector<llvm::StringRef,std::allocator<_Ty>>::_Ucopy<_Iter>(_Iter,_Iter,llvm::StringRef *)' being compiled
        with
        [
            _Ty=llvm::StringRef,
            _Iter=llvm::StringMapKeyIterator<char>
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\\include\vector(708): note: see reference to function template instantiation 'llvm::StringRef *std::vector<llvm::StringRef,std::allocator<_Ty>>::_Ucopy<_Iter>(_Iter,_Iter,llvm::StringRef *)' being compiled
        with
        [
            _Ty=llvm::StringRef,
            _Iter=llvm::StringMapKeyIterator<char>
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\\include\vector(723): note: see reference to function template instantiation 'void std::vector<llvm::StringRef,std::allocator<_Ty>>::_Range_construct_or_tidy<_Iter>(_Iter,_Iter,std::forward_iterator_tag)' being compiled
        with
        [
            _Ty=llvm::StringRef,
            _Iter=llvm::StringMapKeyIterator<char>
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\\include\vector(723): note: see reference to function template instantiation 'void std::vector<llvm::StringRef,std::allocator<_Ty>>::_Range_construct_or_tidy<_Iter>(_Iter,_Iter,std::forward_iterator_tag)' being compiled
        with
        [
            _Ty=llvm::StringRef,
            _Iter=llvm::StringMapKeyIterator<char>
        ]
C:\agent\_work\2\s\toolchain\swift\lib\Driver\Compilation.cpp(1571): note: see reference to function template instantiation 'std::vector<llvm::StringRef,std::allocator<_Ty>>::vector<IteratorT,void>(_Iter,_Iter,const _Alloc &)' being compiled
        with
        [
            _Ty=llvm::StringRef,
            IteratorT=llvm::StringMapKeyIterator<char>,
            _Iter=llvm::StringMapKeyIterator<char>,
            _Alloc=std::allocator<llvm::StringRef>
        ]
C:\agent\_work\2\s\toolchain\swift\lib\Driver\Compilation.cpp(1571): note: see reference to function template instantiation 'std::vector<llvm::StringRef,std::allocator<_Ty>>::vector<IteratorT,void>(_Iter,_Iter,const _Alloc &)' being compiled
        with
        [
            _Ty=llvm::StringRef,
            IteratorT=llvm::StringMapKeyIterator<char>,
            _Iter=llvm::StringMapKeyIterator<char>,
            _Alloc=std::allocator<llvm::StringRef>
        ]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\\include\xmemory(217): error C2100: illegal indirection
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\\include\xmemory(217): error C2062: type 'unknown-type' unexpected
```

Attempt to make it more explicit with a `std::copy`.
2019-12-04 09:30:12 -08:00
David Ungar
6a6e9357ef Change "experimental" to "fine-grained". 2019-12-04 08:50:44 -08:00
David Ungar
496e602bff Renaming files 2019-12-04 08:38:59 -08:00
David Ungar
3d3507b7b6 Remove unparsed ranges and use diffs to schedule dependents earlier. 2019-12-03 17:23:02 -08:00
David Ungar
3cba2306ca Moving tests and driver refactoring. 2019-12-03 09:24:17 -08:00
David Ungar
448d9df38c Merge pull request #28444 from davidungar/WIP-custom-diff
Fix memory violation when build record is bad.
2019-12-02 10:55:59 -08:00
David Ungar
08cfe80061 Don't crash when asking for comparison but not incremental 2019-11-23 11:21:33 -08:00
David Ungar
62ae2bfd2f Merge pull request #28164 from davidungar/WIP-custom-diff
[Incremental compilation] Source-range-based dependencies
2019-11-21 23:47:52 -08:00
David Ungar
68f0ea2290 fmt 2019-11-21 00:01:34 -08:00
David Ungar
468a23cef9 report stages unfmt 2019-11-20 13:28:19 -08:00
David Ungar
ae64f471cd Reporting refactoring 2019-11-19 16:42:21 -08:00
David Ungar
bc403424ee Use sets 2019-11-19 13:10:33 -08:00
David Ungar
e4fb791a3c bug fix unfmt 2019-11-19 12:30:43 -08:00
David Ungar
ee17f61179 factor out comparator and report supp jobs 2019-11-19 12:22:04 -08:00
David Ungar
d2146d1c47 Report falling back differently. 2019-11-18 23:09:58 -08:00
David Ungar
5d25cd8571 Print negative build decisions with -show-incremental 2019-11-18 22:58:34 -08:00
David Ungar
aee3cb482e Try both in filelist for linker 2019-11-18 22:19:43 -08:00
David Ungar
38a6559aa9 Take path arg for comparo 2019-11-18 20:23:10 -08:00
David Ungar
0a0d22abab fmt 2019-11-16 23:54:52 -08:00
David Ungar
edbbdb65c7 WIP 2019-11-16 23:41:31 -08:00
David Ungar
a6bf84e20b refactoring WIP unfmt 2019-11-16 23:17:37 -08:00
David Ungar
3433bf8cef comparision WIP 2019-11-16 21:39:19 -08:00
David Ungar
0b00afea7e pass compilation in to loadAllInfo in prep to do removed files 2019-11-16 08:52:11 -08:00
David Ungar
15ea29c3aa Handle new file 2019-11-15 22:22:06 -08:00
David Ungar
754c44fbc7 Test top-level additions 2019-11-15 13:21:45 -08:00
David Ungar
30429c0fa1 Ensure that files with missing supplementaries get recompiled. 2019-11-12 20:41:03 -08:00
David Ungar
033eaec1e8 Fix bug around scheduling when dep loads fail. 2019-11-12 20:41:03 -08:00
David Ungar
b309759028 Keep message same as before for the sake of tests. 2019-11-12 20:41:03 -08:00
David Ungar
69dcc3ba18 Fix bug for newly-added failing job with swiftdeps filename 2019-11-12 20:41:03 -08:00
David Ungar
2cbd5e7a16 Ensure that a dependency load failure schedules all jobs. 2019-11-12 20:41:03 -08:00
David Ungar
742c3985bd Source-range-based dependencies
Frontend outputs source-as-compiled, and source-ranges file with function body ranges and ranges that were unparsed in secondaries.
Driver computes diffs for each source file. If diffs are in function bodies, only recompiles that one file. Else if diffs are in what another file did not parse, then the other file need not be rebuilt.
2019-11-12 20:41:02 -08:00
Jordan Rose
632399e0f8 [Driver] Include more info in "crash because TMPDIR is borked" errors (#27412)
Two places in Driver are creating temporary files at a point in the
process where failure is not expected. We should do something better
about this, but meanwhile harmonize their failures and include a
little more info.

Filed https://bugs.swift.org/browse/SR-11541 to improve this.
2019-09-30 18:18:27 -07:00
Jason Mittertreiner
8998235ed6 Enable Child Memory Usage Tracking on Windows (#23686)
Windows requires a handle to get memory usage, so do a slight refactor
to collect the child's memory usage as it exits instead of as the parent
is cleaning up.
2019-03-30 18:54:30 -07:00
David Ungar
2f65ac3735 Cosmetic cleanups 2019-01-30 17:16:49 -08:00
David Ungar
1fa76b97da Rm debugging code 2019-01-28 15:59:55 -08:00
David Ungar
14ba2a1b60 Format 2019-01-28 15:56:18 -08:00
David Ungar
ae46aa918a Various fixes + debug unfmt 2019-01-27 19:12:59 -08:00
David Ungar
e912642304 1st cut dependency tracing 2019-01-26 18:50:41 -08:00
David Ungar
9d84bc2af1 WIP tracer 2019-01-26 09:36:40 -08:00
David Ungar
323c42c532 Fomat 2019-01-24 18:46:49 -08:00
David Ungar
b520b242dc Collapsed lots of changes. 2019-01-24 18:46:49 -08:00