Commit Graph

2525 Commits

Author SHA1 Message Date
Andrew Breckenridge
a5b777625c docs/Windows: Add disclaimer about llvm_bin_dir & fixup LLVM paths 2018-03-21 14:18:52 -07:00
Andrew Breckenridge
9edc07cd9e docs/Windows: Add note about using forward slashed paths 2018-03-21 14:10:42 -07:00
Andrew Breckenridge
55c1b2d850 docs/Windows: Remove extra bin from DCMAKE_CXX_COMPILER path 2018-03-21 14:10:42 -07:00
Andrew Breckenridge
42b4add93e docs/Windows: remove unnecessary ninjas in mkdirs 2018-03-21 14:10:42 -07:00
Andrew Breckenridge
55a129cc5e docs/Windows: Add env var for llvm bin dir 2018-03-21 14:10:42 -07:00
Arnold Schwaighofer
3cbabfd196 Merge pull request #15208 from aschwaighofer/resilient_enum_case_tags
IRGen: Make resilient enum's tag indices resilient
2018-03-21 10:21:07 -07:00
David Zarzycki
283713d61d [Testing] Formalize stress tests
Stress tests are, by definition, stressful. They intentionally burn a
lot of resources by using randomness to hopefully surface state machine
bugs. Additionally, many stress tests are multi-threaded these days and
they may attempt to use all of the available CPUs to better uncover
bugs. In isolation, this is not a problem, but the test suite as a whole
assumes that individual tests are single threaded and therefore running
multiple stress tests at once can quickly spiral out of control.

This change formalizes stress tests and then treats them like long
tests, i.e. tested via 'check-swift-all' and otherwise opt-in.

Finally, with this change, the CI build bots might need to change if
they are still only testing 'validation' instead of all of the tests.
I see three options:

1) Run all of the tests. -- There are very few long tests left these
   days, and the additional costs seems small relative to the cost of
   the whole validation test suite before this change.
2) Continue checking 'validation', now sans stress tests.
3) Check 'validation', *then* the stress tests. If the former doesn't
   pass, then there is no point in the latter, and by running the stress
   tests separately, they stand a better chance of uncovering bugs and
   not overwhelming build bot resources.
2018-03-20 21:45:28 -04:00
Arnold Schwaighofer
ce7608a7ce IRGen: Make resilient enum's tag indices resilient
This allows reordering enum cases resiliently.

rdar://24057946
2018-03-20 13:19:56 -07:00
swift-ci
c1c5931130 Merge pull request #15105 from gonsolo/patch-1 2018-03-10 16:52:12 -08:00
Miguel Salinas
6c8f2aa1b0 Add -Osize optimization documentation 2018-03-10 09:51:44 -06:00
Arnold Schwaighofer
1e4f55de8d Merge pull request #15046 from aschwaighofer/without_actually_escaping_verification
Implement withoutActuallyEscaping verification
2018-03-09 09:34:06 -08:00
Gonsolo
0e041918ed Remove wrong statement
This statement and the build commands below contradict each other.
2018-03-09 11:32:38 +01:00
swift-ci
0b9c973017 Merge pull request #15077 from atrick/noescape-doc 2018-03-08 16:00:16 -08:00
Andrew Trick
2aebd75786 Document the @noescape SIL function type attribute. 2018-03-08 13:41:24 -08:00
Arnold Schwaighofer
e616f0a6a8 Add documentation to SIL.rst for convert_function to clarify escaping and not escaping types 2018-03-08 07:44:00 -08:00
Huon Wilson
b330c6078f Merge pull request #14948 from huonw/at-owned
Make __owned functional, maybe
2018-03-08 13:18:19 +11:00
Huon Wilson
e307e54098 [AST] Explicitly track things marked __owned. 2018-03-08 12:36:24 +11:00
Jake Petroules
96c0083d02 [Driver] Provide executed command as an actual array (#15012)
This patch adds additional entries to the JSON command messages output
by the Swift compiler. It's now possible to get the command executable
("command_executable") and arguments ("command_arguments") as a single
string and array, respectively, rather than having to parse the
shell-escaped command line provided in the "command" key.

<rdar://problem/35701809>
2018-03-07 10:40:38 -08:00
Arnold Schwaighofer
5940796cc1 SIL: Add an is_escaping_closure instruction
Will be used to verify that withoutActuallyEscaping's block does not
escape the closure.

``%escaping = is_escaping_closure %closure`` tests the reference count. If the
closure is not uniquely referenced it prints out and error message and
returns true. Otherwise, it returns false. The returned result can be
used with a ``cond_fail %escaping`` instruction to abort the program.

rdar://35525730
2018-03-07 08:56:00 -08:00
John McCall
9a4540e84d Split the instantiation function into two phases.
The allocation phase is guaranteed to succeed and just puts enough
of the structure together to make things work.

The completion phase does any component metadata lookups that are
necessary (for the superclass, fields, etc.) and performs layout;
it can fail and require restart.

Next up is to support this in the runtime; then we can start the
process of making metadata accessors actually allow incomplete
metadata to be fetched.
2018-03-06 03:07:55 -05:00
Arnold Schwaighofer
ee68d4edb7 Merge pull request #14924 from aschwaighofer/wip_effects_release_none
Add an effects(releasenone) function effects attribute
2018-03-05 12:06:17 -08:00
Arnold Schwaighofer
93ab9302a6 Fix rst error 2018-03-05 09:29:43 -08:00
elk941
aa207ad5c2 Fix grammer mistake in ABIStabilityManifesto.xml (#14943) 2018-03-05 09:20:52 -08:00
Arnold Schwaighofer
6fe0633c08 Add @effects(releasenone) documentation. 2018-03-05 07:03:54 -08:00
Sho Ikeda
8ca8b67593 Serialization.rst: Fix typo 2018-03-04 21:40:12 +09:00
Andrew Breckenridge
2c8d58c6fd docs/WindowsBuild: Update cmark build invocation to Release mode 2018-02-26 13:44:37 -08:00
John McCall
dd99536d31 Move the metadata-pattern header into the type context descriptor.
This is yet another waypoint on the path towards the final
generic-metadata design.  The immediate goal is to make the
pattern a private implementation detail and to give the runtime
more visibility into the allocation and caching of generic types.
2018-02-26 12:10:24 -05:00
Joe Groff
4c2dde56a0 IRGen: Lower external key path components.
The key path pattern needs to include a reference to the external descriptor, along with hooks for lowering its type arguments and indices, if any. The runtime will need to instantiate and interpolate the external component when the key path object is instantiated.

While we're here, let's also reserve some more component header bytes for future expansion, since this is an ABI we're going to be living with for a while.
2018-02-23 19:03:15 -08:00
swift-ci
c2347597c4 Merge pull request #14764 from AndrewSB/clang-cl-over-msvc 2018-02-22 12:33:40 -08:00
Graydon Hoare
4867ec0061 [Docs] Explain batch mode a bit, in DriverInternals.rst 2018-02-21 17:03:32 -08:00
Andrew Breckenridge
beec93dc18 docs/WindowsBuild: Reorder clang-cl & MSVC + Add MSVC Swift invocation 2018-02-21 13:44:32 -08:00
Saleem Abdulrasool
03590d1fe1 Merge pull request #14562 from AndrewSB/who-needs-a-single-doc
[docs][Windows] Add context and split doc into multiple files
2018-02-21 13:37:24 -08:00
Andrew Breckenridge
6a8b1e2a40 docs/Windows: Format and clarify documentation 2018-02-20 20:33:09 -08:00
Andrew Breckenridge
9305156c05 docs/WindowsBuild: Remove incorrect comment about supported versions 2018-02-20 17:16:20 -08:00
Andrew Breckenridge
b9cbc63feb docs/WindowsCrossCompile: Remove VS env vars that are no longer used 2018-02-20 17:16:20 -08:00
Andrew Breckenridge
8d73c6d562 docs/WindowsCrossCompile: Fix ICU flags for Swift build 2018-02-20 17:16:12 -08:00
Andrew Breckenridge
dc103336d1 docs/Windows: Split doc into multiple files 2018-02-20 17:15:53 -08:00
Kyle Murray
a251e0e7e8 Fix em dash and apostrophe presentation in the Swift man page.
Terminal currently renders em dashes and apostrophes incorrectly:

"please file a report to AppleXs bug reporter"
"features X being fast is rare"

Also reformats some whitespace to remove a double space after a
sentence:

"a great way for anyone to help improve Swift.  The bug tracker"
2018-02-19 14:34:42 -08:00
John Eismeier
6cfc648d2a Fix spacing 2018-02-16 15:00:59 -05:00
John Eismeier
09452396cc Propose fixing some typos 2018-02-15 14:37:51 -05:00
Graydon Hoare
3a023534b3 [Docs] Add more details about -stats-output-dir and -trace-stats-events 2018-02-09 15:53:40 -08:00
Arnold Schwaighofer
cf5b5dcb68 Merge pull request #14440 from aschwaighofer/convert_function_to_trivial
SIL: Add a convert_function_to_trivial instruction for converting escaping t…
2018-02-07 05:11:36 -08:00
swift-ci
50637d1080 Merge pull request #14439 from AndrewSB/one-tenth-the-build-time-🤦‍♂️ 2018-02-06 19:05:04 -08:00
Arnold Schwaighofer
d51053b003 Add convert_escape_to_noescape instruction for converting escaping to noescape functions
@noescape function types will eventually be trivial. A
convert_escape_to_noescape instruction does not take ownership of its
operand. It is a projection to the trivial value carried by the closure
-- both context and implementation function viewed as a trivial value.

A safe SIL program must ensure that the object that the project value is based
on is live beyond the last use of the trivial value. This will be
achieve by means of making the lifetimes dependent.

For example:

  %e = partial_apply [callee_guaranteed] %f(%z) : $@convention(thin) (Builtin.Int64) -> ()
  %n = convert_escape_to_noescape %e : $@callee_guaranteed () -> () to $@noescape @callee_guaranteed () -> ()
  %n2 = mark_dependence %n : $@noescape @callee_guaranteed () -> () on %e : $@callee_guaranteed () -> ()
  %f2 = function_ref @use : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> ()
  apply %f2(%n2) : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> ()
  release_value %e : $@callee_guaranteed () -> ()

Note: This is not yet actually used.

Part of:
SR-5441
rdar://36116691
2018-02-06 18:01:23 -08:00
Andrew Breckenridge
063849d520 [docs][Windows] Build clang in Release mode instead of Debug
Should result in ~10x faster build times.
2018-02-06 11:16:04 -08:00
Andrew Breckenridge
5218326b27 [docs][Windows] Add forgotten ^ to LLVM_TARGETS_TO_BUILD 2018-02-06 11:07:16 -08:00
Arnold Schwaighofer
d981bb1d96 Mangling: noescape functions will be trivial and no longer compatible with escape function types.
Mangle escapeness as part of the type.

Part of:
SR-5441
rdar://36116691
2018-02-06 08:51:43 -08:00
Saleem Abdulrasool
63fe8c49b0 Merge pull request #14329 from AndrewSB/save-the-env-🌱
[docs][Windows] Add LLVM_TARGETS_TO_BUILD flag to LLVM CMake invocation
2018-02-06 08:20:48 -08:00
Erik Eckstein
4a0ec87294 docs: Mention the blockifyasm script in DebuggingTheCompiler 2018-02-02 15:31:47 -08:00
Andrew Breckenridge
65f3d21af5 [docs][Windows] Add LLVM_TARGETS_TO_BUILD flag to LLVM CMake invocation 2018-02-01 14:55:34 -08:00