Commit Graph

1938 Commits

Author SHA1 Message Date
swift-ci
116de13e22 Merge remote-tracking branch 'origin/master' into master-next 2018-06-22 01:09:58 -07:00
Doug Gregor
197642d37b [Request-evaluator] Track # of evaluations for each request kind.
Using the unified stats reporter, track the # of evaluations for each
type checking request kind.
2018-06-22 00:01:55 -07:00
swift-ci
9885d9e133 Merge remote-tracking branch 'origin/master' into master-next 2018-06-21 09:10:01 -07:00
Doug Gregor
81bee08369 [AST] Make ValueDecls displayable via their DeclRefs. 2018-06-21 06:39:03 -07:00
swift-ci
293bd1d0cc Merge remote-tracking branch 'origin/master' into master-next 2018-06-19 12:09:50 -07:00
Mark Lacey
14f3f3e08a Add a frontend option to disable the "shrink" part of the solver.
We sometimes see expression type checking times increase dramatically
when this is enabled, and having a way to disable will make it
possible to easily do measurements to determine the cost/benefit of
having this enabled.
2018-06-19 10:21:19 -07:00
swift-ci
4538ce9818 Merge remote-tracking branch 'origin/master' into master-next 2018-06-17 15:38:24 -07:00
Doug Gregor
b1b3c43c59 [Request-evaluator] Add -debug-cycles flag to print cycles.
As a debugging aid, introduce a new frontend flag `-debug-cycles` that
will emit a debug dump whenever the request-evaluator encounters a cyclic
dependency, while otherwise allowing compilation to continue.
2018-06-16 10:29:52 -07:00
Doug Gregor
d098b3e571 [Sema] Remove the IterativeTypeChecker. 2018-06-15 22:46:55 -07:00
Bob Wilson
c3e02955bb [master-next] Adjust for VersionTuple moving from clang to llvm.
LLVM r334399 (and related Clang changes) moved clang::VersionTuple to
llvm::VersionTuple. Update Swift to match.

Patch by Jason Molenda.
rdar://problem/41025046
2018-06-12 16:44:11 -07:00
Bob Wilson
796122fa45 Merge remote-tracking branch 'origin/master' into master-next 2018-06-12 15:06:47 -07:00
Bob Wilson
b2821e70f9 [master-next] Use new llvm::sys::procid_t type from LLVM r334294
Use llvm::sys::procid_t instead of llvm::sys::ProcessInfo::ProcessId.
Patch by Jason Molenda
rdar://problem/41025619
2018-06-12 14:50:29 -07:00
Doug Gregor
0f2de235c5 Merge pull request #15917 from DougGregor/evaluator
Introduce a simple request evaluator.
2018-06-12 10:41:08 -07:00
swift-ci
e7b949e94e Merge remote-tracking branch 'origin/master' into master-next 2018-06-09 23:49:27 -07:00
Slava Pestov
d5ec1827a4 Basic: Change isSwiftVersionAtLeast() to take optional minor version number
I want to be able to do an isSwiftVersionAtLeast(4, 2) check.
2018-06-09 22:02:52 -07:00
Doug Gregor
44099adeb9 [Evaluator] Simplify the definition of cycle diagnostics for a SimpleRequest.
The arithmetic evaluator cannot really make use of the new diagnostics
machinery, but put it in place for other request kinds.
2018-06-01 14:47:07 -07:00
Doug Gregor
a4db1d0ec6 [TypeID Fix comment regarding SWIFT_TYPEID_ZONE 2018-06-01 08:56:18 -07:00
Doug Gregor
346bb99f73 [Evaluator] GraphViz printing for all of the dependencies.
Introduce another form of debugging dump for the evaluator, rendering the
complete dependency graph using GraphViz, including all dependencies and
values cached within the evaluator.
2018-06-01 08:56:18 -07:00
Doug Gregor
d687446e06 [Evaluator] Simplify the definition of new requests and make them printable.
Introduce a CRTP base class, SimpleRequest, which simplifies the task of
defining a new request kind by handling the storage of the values (in a
std::tuple), their hashing, equality, printing, etc. The values are passed
along to the subclass’s operator() so they’re mostly treated as (const)
parameters, making mutation of the request state impossible.

Extend AnyValue and AnyRequest with printing logic, so we can print any
request for debugging purposes, and
2018-06-01 08:56:18 -07:00
Doug Gregor
cbc6289962 [TypeID] Use .def files to introduce TypeID specializations.
Simplify the static registration of types for use with TypeID by introducing
a more declarative approach. Each zone provides a .def file listing the
types and templates defined by that zone. The .def file is processed by
include/swift/Basic/DefineTypeIDZone.h with its zone number, which assigns
values to each of the types/templates and introduces the TypeID
specializations.
2018-06-01 08:56:18 -07:00
Doug Gregor
8886fca400 Address the simple issues raised by Graydon and Huon 2018-06-01 08:56:18 -07:00
Doug Gregor
4ac125f41f [Evaluator] Introduce a simple request evaluator.
Meant as a replacement for the barely-started iterative type checker,
introduce a simpler "evaluator" that can evaluate individual requests
(essentially, function objects with some additional API), caching
results as appropriate and detecting cycles.
2018-06-01 08:56:18 -07:00
swift-ci
141f04e2e2 Merge remote-tracking branch 'origin/master' into master-next 2018-05-25 17:09:00 -07:00
Benjamin Herzog
07d4303b40 Merge pull request #16444 from BenchR267/feature/add-metrics-to-driver-output
[Driver] Added process information to emitted task messages
2018-05-25 16:49:09 -07:00
Benjamin Herzog
ac10fb3462 [Driver] Added process information to emitted messages
When providing the -parseable-output flag to the swift compiler, it will provide json formatted messages about tasks that run.
I added some optional usage information in form of user time, system time and maxrss to the output. This can be used by other tools using the compiler to get some insights about time and memory usage.
Since the output does not longer match processes run (in batch mode), I also added a real_pid field so the client could reason about jobs that belong together if needed.

rdar://39798231
2018-05-25 13:12:57 -07:00
swift-ci
c1d5407fc0 Merge remote-tracking branch 'origin/master' into master-next 2018-05-24 15:29:05 -07:00
Huon Wilson
60ae475ca0 [IRGen] Make -emit-public-type-metadata-accessors a no-op.
This work-around is no longer needed now that the full fix landed in
https://github.com/apple/swift/pull/16615. The argument is left with a warning
to help with migration between compilers with the work-around and compilers with
the full fix (see also rdar://problem/40502379).

Fixes rdar://problem/40476573.
2018-05-24 09:37:35 +10:00
swift-ci
9d02f94670 Merge remote-tracking branch 'origin/master' into master-next 2018-05-22 10:49:24 -07:00
Alex Hoppen
8998b27dd4 [incrParse] Add coloured output indicating which code got reused 2018-05-22 08:52:34 -07:00
Alex Hoppen
de9737c946 [incrParse] Support incremental parsing for edited files 2018-05-22 08:52:33 -07:00
swift-ci
d82df30906 Merge remote-tracking branch 'origin/master' into master-next 2018-05-16 19:49:03 -07:00
Joe Groff
e2bcd784f1 Lazy: Put an initializer expression on Lazy::OnceToken.
Recent builds of clang give C++ globals of a type global constructors if they have a mix of explicitly initialized and default-initialized fields, apparently.
2018-05-16 15:16:47 -07:00
swift-ci
3551bc5ae5 Merge remote-tracking branch 'origin/master' into master-next 2018-05-14 22:09:19 -07:00
Doug Gregor
20832fd2c5 Add -emit-public-type-metadata-accessors to work around metadata linkage bug.
IRGen can introduce calls to type metadata accessors for types that
should not be visible to the current translate, which can manifest in
linker errors within a module (for references to private types when
whole module optimization is disabled) or across modules (for
references to private/internal types in another module). Introduce a
new compiler flag `-emit-public-type-metadata-accessors` that emits
all type metadata accessors with public linkage, to work around the
problem in affected projects. This flag is intended to go away once we
have a proper solution.

This bug has been around in Swift "forever", but compiling the
overlays using -enable-resilience has exacerbated the problem and
caused regressions. This is a short-term fix to
rdar://problem/40229755 while we work on the correct long-term fix.
2018-05-14 17:09:14 -07:00
swift-ci
32fff5e9c7 Merge remote-tracking branch 'origin/master' into master-next 2018-05-14 12:48:58 -07:00
Pavel Yaskevich
3e254678a2 [Sema] Add counter to track number of constraints considered by each edge contraction attempt 2018-05-12 02:37:52 -07:00
swift-ci
53f8e0b455 Merge remote-tracking branch 'origin/master' into master-next 2018-05-07 19:29:19 -07:00
David Zarzycki
e878fcafbd [Basic] NFC: Quiet global ctor warnings with Lazy<T> 2018-05-07 19:43:32 -04:00
Bob Wilson
e4db2316fb master-next: Use InitLLVM from LLVM r330046
This is needed to work with other related changes, especially on Windows.
2018-04-24 09:34:59 -07:00
swift-ci
6bf55465a1 Merge remote-tracking branch 'origin/master' into master-next 2018-04-23 22:29:25 -07:00
Huon Wilson
b866e43265 [NFC] Squash \param documentation warning. 2018-04-24 13:30:35 +10:00
swift-ci
1ffaa392aa Merge remote-tracking branch 'origin/master' into master-next 2018-04-18 14:29:17 -07:00
swift-ci
ea39ceae79 Merge pull request #15999 from graydon/rdar-39504759-keep-demultiplexing-after-first-read 2018-04-18 14:18:48 -07:00
Graydon Hoare
c1682fa465 [Driver] <rdar://39504759> Continue demultiplexing subprocess output after initial read. 2018-04-18 11:52:11 -07:00
swift-ci
56f86aaa4d Merge remote-tracking branch 'origin/master' into master-next 2018-04-18 10:29:08 -07:00
David Zarzycki
a8fbe3a18e [AST] NFC: Repack misc DeclAttribute bits into inline bitfield 2018-04-18 11:25:11 -04:00
swift-ci
bef92f0ff2 Merge remote-tracking branch 'origin/master' into master-next 2018-04-16 12:27:50 -07:00
Michael Gottesman
5113657db6 [stringref-upgrade] Inject llvm::StringLiteral into the Swift namespace like we have done with StringRef.
StringLiteral is a subclass of StringRef that is intended to be used for global
constant strings in a constexpr context.

I am going to be refactoring some uses of const char foo[] = ""; to use this
instead.
2018-04-16 09:54:36 -07:00
swift-ci
115f220410 Merge remote-tracking branch 'origin/master' into master-next 2018-04-11 22:15:16 -07:00
Saleem Abdulrasool
a80dd5b963 Basic: attempt to repair inverted dependencies
When linking on Linux, we would fail with unresolved symbol references
to swift::FrontendStatsTracer::getTraceFormatter<T>. The use of the
types, which are defined in swiftSIL occur in swiftBasic.  Provide
inline definitions of the constructors which cause the dependency on
some environments (e.g. Linux).
2018-04-10 10:40:10 -07:00