Commit Graph

225 Commits

Author SHA1 Message Date
Jordan Rose
c5dcf01aca Merge pull request #14814 from jrose-apple/dump-truck
Dump (some) filelists in the PrettyStackTrace
2018-03-12 09:13:20 -07:00
Jordan Rose
6243096b0b Dump input filelists in the PrettyStackTrace
This may help us reproduce a failing build when all we have is a build
log, and will become much more important in batch mode when we
/really/ need to know what ended up in what batch.

For now, this doesn't include /output/ filelists, because David's
about to mess with that code anyway to make things better around
supplementary outputs in batch mode. There is one weirdness there,
though, which is that ArgsToFrontendInputsConverter peeks at the
outputs to see whether we're doing single-threaded or multi-threaded
WMO.
2018-03-09 18:32:02 -08:00
Jordan Rose
41286bc676 Make JSON fix-it outputs be per-primary in batch mode. (#14995)
This means moving the output path into SupplementaryOutputPaths, and
using the same sort of diagnostic dispatching that serialized
diagnostics use. This is part of what's needed to run the migrator
in batch mode.
2018-03-09 11:58:54 -08:00
Graydon Hoare
6285332094 [BatchMode] Accumulate SILModule counters across batch constituents. 2018-03-07 12:25:23 -08:00
Graydon Hoare
0cd182defc Merge pull request #14900 from jrose-apple/mux
Wire up FileSpecificDiagnosticConsumer for serialized diagnostics
2018-03-02 18:32:17 -08:00
Jordan Rose
de74836673 Wire up FileSpecificDiagnosticConsumer for serialized diagnostics
It appears to work!
2018-03-02 13:23:16 -08:00
Jordan Rose
3cd9f166bc Don't spend time initializing LLVM when running the driver (#14896)
Tiny start-up time optimization noticed while looking at how we do
PrettyStackTraceProgram. Also add PrettyStackTraceProgram to a few
more of our testing tools, via the new PROGRAM_START macro.
2018-02-28 19:56:19 -08:00
Graydon Hoare
ac11a2688c [BatchMode] Fix a single-primary assumption in FrontendTool, add test. 2018-02-28 15:57:27 -08:00
David Ungar
4866df6dfd Move SupplementaryOutputs into each InputFile. 2018-02-28 09:41:49 -08:00
Graydon Hoare
628c446fe3 [Stats] Add -profile-stats-{events,entities} 2018-02-21 16:22:48 -08:00
David Ungar
488db9fb9b Fix ReferencedNameTracker in preparation for batch mode. 2018-02-16 22:28:10 -07:00
David Ungar
dec78900cd Only use supplementary outputs for first parallel-generated input. 2018-02-15 15:34:55 -07:00
David Ungar
e7a120f9b3 Avoid copying strings and PrimarySpecificPaths. 2018-02-15 15:34:55 -07:00
David Ungar
a2863a611f Added explanation for emitIndexDataIfNeeded call. 2018-02-15 15:34:55 -07:00
David Ungar
fec411e9bc reformatted 2018-02-15 15:34:55 -07:00
David Ungar
1f9a4f3591 Pass around arguments for primary-specific filenames.
Get rid of IRGenOpts attributes that won’t work for batch mode and also remove fakeNamesStub.
2018-02-15 15:34:55 -07:00
Xi Ge
37f352fe41 sourcekitd: build Swift syntax tree more lazily than collecting parsed tokens. (#14578)
Before this patch, we have one flag (KeepSyntaxInfo) to turn on two syntax
functionalities of parser: (1) collecting parsed tokens for coloring and
(2) building syntax trees. Since sourcekitd is the only consumer of either of these
functionalities, sourcekitd by default always enables such flag.
However, empirical results show (2) is both heavier and less-frequently
needed than (1). Therefore, separating the flag to two flags makes more
sense, where CollectParsedToken controls (1) and BuildSyntaxTree
controls (2).

CollectingParsedToken is always enabled by sourcekitd because
formatting and syntax-coloring need it; however BuildSyntaxTree should
be explicitly switched on by sourcekitd clients.

resolves: rdar://problem/37483076
2018-02-13 16:27:12 -08:00
David Ungar
52b54dca95 Remove undefined behavior warning for null reference passed to emitLoadedModuleTraceIfNeeded. 2018-02-11 13:59:49 -08:00
David Ungar
ba4f2a84b4 Move supplementary outputs to SupplementaryOutputs in FrontendInputsAndOutputs. 2018-02-07 13:55:32 -08:00
David Ungar
7271f682bf Tweaks to shorten performCompile* a bit more. 2018-02-05 19:30:26 -08:00
David Ungar
15011fbc2f Change getSourceFileOfCodeToBeGenerated to getPrimaryOrMainSourceFile.
# Conflicts:
#	lib/FrontendTool/FrontendTool.cpp
2018-02-05 17:47:48 -08:00
David Ungar
34df54a44a Don’t extract ensureSILModuleIsSerialized. 2018-02-05 17:47:47 -08:00
David Ungar
679c6ae909 Allow for both generating an ObjC header & emitting index data. 2018-02-05 17:47:47 -08:00
David Ungar
d3f16229c0 Tweaks to shorten performCompile* a bit more.
# Conflicts:
#	lib/FrontendTool/FrontendTool.cpp
2018-02-05 17:47:47 -08:00
David Ungar
5b443c0a44 Extract generateCode. 2018-02-05 17:47:47 -08:00
David Ungar
6234132ad3 Extract validateTBDIfNeeded. 2018-02-05 17:47:46 -08:00
David Ungar
7b74a5bdbb Extract generateIR. 2018-02-05 17:47:46 -08:00
David Ungar
4789ba5ff7 Extract processCommandLineAndRunImmediately. 2018-02-05 17:47:46 -08:00
David Ungar
728080daf9 Add if needed test to emitIndexData. 2018-02-05 17:47:46 -08:00
David Ungar
a0fd766b94 Extract ensureSILModuleIsSerialized. 2018-02-05 17:47:45 -08:00
David Ungar
9df71766f3 Extract serializeSIB. 2018-02-05 17:47:36 -08:00
David Ungar
4c657c776e Factor out writeSIL with fewer arguments and linkAllIfNeeded. 2018-02-05 17:06:23 -08:00
David Ungar
c062bb283f Extract generateSILModules. 2018-02-05 17:06:23 -08:00
David Ungar
34bc84f9a2 Extract writeTBDIfNeeded. 2018-02-05 17:06:23 -08:00
David Ungar
7c5c20f27e Extract setPrivateDiscrimatorIfNeeded. 2018-02-05 17:06:22 -08:00
David Ungar
f25c53026f Extract performSILOptimizations. 2018-02-05 17:06:22 -08:00
David Ungar
01c1eb6830 Extract computeSerializationOptions 2018-02-05 17:06:22 -08:00
David Ungar
74c6f54853 Extract performMandatorySILPasses. 2018-02-05 17:06:21 -08:00
David Ungar
4252263cbe Extract emitReferenceDependenciesIfNeeded 2018-02-05 17:06:21 -08:00
David Ungar
03dff910ca Extract dumpASTIfNeeded. 2018-02-05 17:06:11 -08:00
David Ungar
e2cc07a7a1 Extract verifyGenericSignaturesIfNeeded. 2018-02-02 20:26:59 -08:00
David Ungar
4821e15795 Extract shouldActionOnlyParse. 2018-02-02 20:25:05 -08:00
David Ungar
401bba3945 Extract compileLLVMIR. 2018-02-02 20:24:49 -08:00
David Ungar
d32020ae10 Move test for emitting loaded module trace into emitLoadedModuleTrace.
# Conflicts:
#	lib/FrontendTool/FrontendTool.cpp
2018-02-02 20:23:50 -08:00
David Ungar
2971332478 Extract precompileBridgingHeader 2018-02-02 13:52:15 -08:00
David Ungar
8cf8f75185 Move test for emitting loaded module trace into emitLoadedModuleTrace.
Laying groundwork for multiple primaries.
2018-02-02 13:50:53 -08:00
David Ungar
c396a3a972 Don’t free the ASTContext if > 1 primary input. 2018-02-02 13:49:08 -08:00
David Ungar
354a76ac4e Merge pull request #14198 from davidungar/PR-18-3c-exp2
[Batch mode] Move frontend main output files to FrontendInputsAndOutputs. (1)
2018-02-01 16:42:10 -08:00
David Ungar
614006bc4f Move main outputs to FrontendInputsAndOutputs and InputFile 2018-02-01 11:55:08 -08:00
Rintaro Ishizaki
fced748790 [Syntax] Represent missing optioanl nodes as nullptr (#14300)
Allocating RawSyntax/SyntaxData for missing optional node is a waste of
resource.
2018-01-31 19:24:00 +09:00