Commit Graph

66 Commits

Author SHA1 Message Date
Felipe de Azevedo Piovezan
a321b0afe0 [DebugInfo] Update tests to expect new LLVM debug format 2024-07-23 11:06:12 -07:00
Erik Eckstein
39bb14b094 change mangling prefix from $S to $s
This is the final ABI mangling prefix

rdar://problem/38471478
2018-09-19 13:55:11 -07:00
Michael Gottesman
cb80f65f1e Remove plus_zero_test,plus_one_test from lit tests since they are no longer needed.
I am going to leave in the infrastructure around this just in case. But there is
no reason to keep this in the tests themselves. I can always just revert this
and I don't think merge conflicts are likely due to previous work I did around
the tooling for this.
2018-03-21 20:49:52 -07:00
Michael Gottesman
e567bc9028 [+0-all-args] Enable +0 normal arguments.
rdar://34222540
2018-03-19 20:25:31 -07:00
Michael Gottesman
8dd5ea9b60 [+0-all-args] Add a space after REQUIRES: plus_one_runtime to eliminate avoidable merge conflicts when editing other parts of the file.
This helps my tooling for enabling +0.
2018-03-11 16:19:09 -07:00
Michael Gottesman
e6e55df5ea [+0-all-args] Mark all tests that will need updates for +0 as requiring a plus_one_runtime. 2018-03-10 02:37:51 -08:00
Arnold Schwaighofer
3a63c0fc76 Update tests 2018-02-13 04:19:59 -08:00
Erik Eckstein
cd3d50a5d9 ABI: Change the mangling prefix from _T0 to $S 2018-01-06 13:55:59 -08:00
Arnold Schwaighofer
0971d82f70 SILGen: Remaining fixes for @callee_guaranteed closures and enable it
- Fix block to func reabstraction thunks block argument handling
- Forward cast ownership
- Fix applyPartiallyAppliedSuperMethod ownership for @callee_guaranteed closures
- Avoid a copy in buildBlockToFuncThunkBody
- Update tests for callee_guaranteed closures

SR-5441
rdar://33255593
2017-11-15 19:46:08 -08:00
codestergit
a30fca4ae6 Fix the testcase 2017-04-03 19:13:18 +05:30
codestergit
aa9e9edc8a [Stdlib] Improves sort and sorted to accept throwing clousre
This commit resolves https://bugs.swift.org/browse/SR-715
2017-04-03 16:59:02 +05:30
Erik Eckstein
c4a11f4c92 tests: remove the now unused option -new-mangling-for-tests 2017-03-22 11:28:43 -07:00
Erik Eckstein
a04a29af4f mangling: efficient mangling of repeated substitutions
Instead of appending a character for each substitution, we now prefix the substitution with the repeat count, e.g.
AbbbbB -> A5B

The same is done for known-type substitutions, e.g.
SiSiSi -> S3i

This significantly shrinks mangled names which contain large lists of the same type, like
  func foo(_ x: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int))

rdar://problem/30707433
2017-03-05 17:41:43 -08:00
Erik Eckstein
720676f3ee tests: more tests converted to the new mangling under the -new-mangling-for-tests option 2017-01-26 08:54:31 -08:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Dave Abrahams
014b6972cf isOrderedBefore: => by areInIncreasingOrder: 2016-07-19 07:05:54 -06:00
Michael Gottesman
fc37603c5f Revert "Implement SE-0118" 2016-07-18 16:44:58 -07:00
Dave Abrahams
f3ccc956c6 isOrderedBefore: => by areInIncreasingOrder: 2016-07-18 14:29:09 -06:00
Michael Gottesman
40e1991e12 Revert "Name and label changes for closure parameters (for review only) (#2981)"
This reverts commit 18406900ba.
2016-07-15 19:45:26 -07:00
Dave Abrahams
18406900ba Name and label changes for closure parameters (for review only) (#2981)
Implement SE-0118 Name and label changes for closure parameters

[SE-0118](https://github.com/apple/swift-evolution/blob/master/proposals/0118-closure-parameter-names-and-labels.md)
2016-07-15 15:31:48 -07:00
Adrian Prantl
b9712dbb61 Update testcases for upstream LLVM changes.
rdar://25785066

(cherry picked from commit 01c992ccb2)
(cherry picked from commit 2e2bac1aa8ae389243a9c8cceed3b52683c2bf03)
2016-05-13 22:04:19 -07:00
Saleem Abdulrasool
a9a8af2a52 test: fix some warnings in closure-multivalue test
Change `var` to let as per the warning.  NFC.
2016-04-30 10:18:44 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Dmitri Gribenko
efaa39ea79 stdlib: add first argument labels and some other changes to conform to API guidelines 2016-02-15 23:47:54 -08:00
Dmitri Gribenko
8f7c9ae3fd Collection.sort() => .sorted() 2015-12-18 16:20:01 -08:00
Adrian Prantl
7821341542 Add an argument-number field to DebugValueInst and friends.
This commit adds a DebugVariable field that is shared by
- AllocBoxInst
- AllocStackInst
- DebugValueInst
- DebugValueAddrInst
Currently DebugVariable only holds the Swift argument number.

This allows us to retire several expensive heuristics in IRGen that
attempted to identify which local variables actually where arguments
and recover their relative order.

Memory footprint notes:
This commit adds a 4-byte field to 4 SILInstructin subclasses.
This was offset by 8ab1e2dd50
which removed 20 bytes from *every* SILInstruction.

Caveats:
This commit surfaces a known bug in FunctionSigantureOpts, tracked in
rdar://problem/23727705 — debug info for exploded function arguments
cannot be expressed until this is fixed.

This reapplies ed2b16dc5a with a bugfix for
generic function arrguments and an additional testcase.

<rdar://problem/21185379&22705926>
2015-12-03 13:40:35 -08:00
Adrian Prantl
2740ad6976 Temporarily Revert "Add an argument-number field to DebugValueInst and friends."
while investigating buildbot breakage.

This reverts commit ed2b16dc5a.
2015-12-02 19:10:05 -08:00
Adrian Prantl
ed2b16dc5a Add an argument-number field to DebugValueInst and friends.
This commit adds a DebugVariable field that is shared by
- AllocBoxInst
- AllocStackInst
- DebugValueInst
- DebugValueAddrInst
Currently DebugVariable only holds the Swift argument number.

This allows us to retire several expensive heuristics in IRGen that
attempted to identify which local variables actually where arguments
and recover their relative order.

Memory footprint notes:
This commit adds a 4-byte field to 4 SILInstructin subclasses.
This was offset by 8ab1e2dd50
which removed 20 bytes from *every* SILInstruction.

Caveats:
This commit surfaces a known bug in FunctionSigantureOpts, tracked in
rdar://problem/23727705 — debug info for exploded function arguments
cannot be expressed until this is fixed.

<rdar://problem/21185379&22705926>
2015-12-02 18:33:07 -08:00
Adrian Prantl
ff45147d27 Re-enable this testcase after some minor tweaking.
rdar://problem/22654702

Swift SVN r31894
2015-09-11 16:32:10 +00:00
Michael Gottesman
18e203d168 XFAIL failing debug info test.
rdar://22654702

Swift SVN r31878
2015-09-11 01:11:04 +00:00
Michael Gottesman
6d74962918 Adapt all DebugInfo testcases to the new upstream LLVM metadata format.
Swift SVN r31813
2015-09-09 04:37:34 +00:00
Andrew Trick
2fc2e5096f Reapply "Add initial support for eliminating nontrivial dead objects."
This reverts commits r29171 and r29170, and reintroduces the optimization. It was
reverted out of paranoia and bad timing.

Swift SVN r29179
2015-05-31 01:43:48 +00:00
Andrew Trick
ff82328edc Revert "Add initial support for eliminating nontrivial dead objects."
This reverts commit r29168.

A SourceKit unit test crashed after enabling this (SyntaxMapData/diags.swift).

I can't debug this at the moment because of a broken install, so I'll have to revert.

Swift SVN r29171
2015-05-30 08:18:11 +00:00
Andrew Trick
6200a76db3 Add initial support for eliminating nontrivial dead objects.
This currently handles fixed size dead arrays, which speeds up Richards (and DeadArray)
by 100x:
Fixes <rdar://problem/20980377> Add dead array elimination to DeadObjectElimination

To handle arrays, I added a run of DeadObjectElimination before high
level semantic inlining. This is necessary to recognize array
initialization. Recognizing low-level operations on the array would
require more extensive analysis with interprocedural escape
information.

Arrays are actually the hard case. To handle the general (easy) case,
I just need to add a simple destructor analysis.

This also makes the order that instructions are removed deterministic.

Swift SVN r29168
2015-05-30 05:12:49 +00:00
Erik Eckstein
8aca63b2fc Don't delete debug_value/debug_value_addr in dead code elimination unless their definitions are dead.
And also adapt a whole set of SIL passes so that they can deal with (the not deleted) debug_value instructions.
This was required to prevent perforamnce and code size regressions.
Now the generated code is (almost) the same as before.

The effect of this change is that we keep debug_value/debug_value_addr also in optimized code (more or less).
Fixes rdar://problem/18709125.




Swift SVN r28872
2015-05-21 13:34:47 +00:00
Dmitri Hrybenko
fe239e3d03 stdlib: de-underscore sort() and partition() methods
Swift SVN r28839
2015-05-20 19:34:36 +00:00
Dmitri Hrybenko
8beb642dc9 Remove uses of println() from test/DebugInfo/closure-multivalue.swift
Swift SVN r28037
2015-05-01 09:34:32 +00:00
Dmitri Hrybenko
155fa0a425 Speculatively revert my change to test/DebugInfo/closure-multivalue.swift
Apparently it broke the test when the standard library is built with
debug info.

Swift SVN r28036
2015-05-01 08:47:02 +00:00
Dmitri Hrybenko
0fce5c7b4e tests: remove uses of println() that are not relevant to the tests
Swift SVN r28016
2015-05-01 03:35:50 +00:00
Duncan Exon Smith
c6d42db070 Adapt to MD* => DI* renaming of debug info types
Applied the upgrade script from r236120 (LLVM) and r236121 (CFE).  This is the
final step of rdar://problem/20434113.



Swift SVN r27925
2015-04-29 21:40:21 +00:00
Dmitri Hrybenko
9ed3a4a196 tests: fix a test for 32-bit platforms
Swift SVN r25745
2015-03-04 05:19:21 +00:00
Duncan Exon Smith
093eb3c365 DebugInfo: Hand-update testcases after LLVM r231082
Update debug info testcases after moving the new hierarchy into place in
upstream LLVM r231082.

rdar://problem/19720042



Swift SVN r25715
2015-03-03 19:15:31 +00:00
Adrian Prantl
1d6d890e13 Adapt upstream LLVM API change.
Swift SVN r25109
2015-02-10 00:55:03 +00:00
Adrian Prantl
af349b7548 Re-enable this testcase.
Swift SVN r24909
2015-02-02 23:35:51 +00:00
Dmitri Hrybenko
49ba1c3a39 Revert "Don't hardcode the integer size."
This reverts commit r24887.  The test was failing on 64-bit OS X after
that fix.

Swift SVN r24890
2015-02-02 03:23:40 +00:00
Adrian Prantl
0d2881db78 Don't hardcode the integer size.
Swift SVN r24887
2015-02-01 16:15:12 +00:00
Dmitri Hrybenko
f47ee38fcb Disable the test DebugInfo/closure-multivalue.swift, it has been failing
for a few days already

rdar://19674999

Swift SVN r24878
2015-01-31 10:52:31 +00:00
Adrian Prantl
7fd7d6f25d Tweak testcase to work with release and debug stdlibs.
Swift SVN r24849
2015-01-30 18:17:27 +00:00
Adrian Prantl
88b7262822 Relax testcase.
Swift SVN r24819
2015-01-29 20:02:58 +00:00
Mark Lacey
a842e35810 Reapply "Handle thin_to_thick_function in call graph construction."
Reapply r24765 with small tweak to comment. This was reverted in r24766.

It turns out that this particular change does not interfere with any
assumptions made in the function signature optimization pass.

Swift SVN r24804
2015-01-28 20:21:45 +00:00