Commit Graph

21 Commits

Author SHA1 Message Date
Erik Eckstein
7cceaff5f3 SIL: don't print operand types in textual SIL
Type annotations for instruction operands are omitted, e.g.

```
  %3 = struct $S(%1, %2)
```

Operand types are redundant anyway and were only used for sanity checking in the SIL parser.

But: operand types _are_ printed if the definition of the operand value was not printed yet.
This happens:

* if the block with the definition appears after the block where the operand's instruction is located

* if a block or instruction is printed in isolation, e.g. in a debugger

The old behavior can be restored with `-Xllvm -sil-print-types`.
This option is added to many existing test files which check for operand types in their check-lines.
2024-11-21 18:49:52 +01:00
Adrian Prantl
6c996056fa Assign variable names for anonymous function arguments in SILGen.
Later stages use the name to disambiguate variables and this amgiguity
can lead to incorrect debug info that crashes LLVM. This also makes
the artificial variable names visible in textual SIL output.

rdar://82313550
2021-09-04 12:01:25 -07:00
Adrian Prantl
c40b8f38b8 Update IRGenDebugInfo for LLVM D95617.
In https://reviews.llvm.org/D95617 LLVM stopped to emit debug values without a
location as an optimization for inlined functions. Because Swift is emitting
dbg.values(undef) for sizeless variables even at -Onone, we need to make sure
all local variables are preserved even at -Onone.

rdar://82038523
2021-08-20 12:57:23 -07:00
Adrian Prantl
e574aa765f Don't emit shadow copies for anonymous variables.
Switch statements generate at least one anonymous match variable per
case, which consumes both a lot of stack space and an explosion of
range extension depencies due to the way case statements are scoped.

rdar://problem/34326355
2017-11-16 10:41:40 -08:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Adrian Prantl
f1709c0cf6 Debug Info: Assign unique names to anonymous variables and arguments.
rdar://problem/18139663
This reapplies ef84c81429 and also takes
$match variables into account.
2015-12-16 15:43:36 -08:00
Adrian Prantl
97332afa62 Temporarily revert "Debug Info: Assign unique names to anonymous variables and arguments."
This reverts commit ef84c81429 because fd6e8a9bef needed to be reverted.
2015-12-16 12:17:41 -08:00
Adrian Prantl
ef84c81429 Debug Info: Assign unique names to anonymous variables and arguments.
rdar://problem/18139663
2015-12-16 11:29:25 -08: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
Adrian Prantl
4f11ecc1da Get rid of Int in the debug info tests and preform some general cleanup.
<rdar://problem/20856296> Extinguish 'Int' from DebugInfo tests

Swift SVN r31177
2015-08-12 18:16:43 +00:00
Doug Gregor
54979b70a7 Remove uses of complete-unnamed function parameters from the testsuite.
Support for "func f(Int)" is going away.

Swift SVN r29608
2015-06-24 16:01:37 +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
Adrian Prantl
a9c3b7a6f4 Revert "XFAIL Failing Debug Info tests to unblock builders. rdar://20245578."
This reverts commit 26366.

Swift SVN r26380
2015-03-20 23:54:34 +00:00
Michael Gottesman
3b5634c30f XFAIL Failing Debug Info tests to unblock builders. rdar://20245578.
Swift SVN r26366
2015-03-20 22:36:12 +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
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Erik Eckstein
e59c4b6eb7 Add -primary-file options to prevent whole-module-optimizations.
This is needed for tests which define internal functions which should not be eliminated.

So far this was not needed because of a hack which prevented whole-module-optimizations for tests.



Swift SVN r22658
2014-10-10 09:51:48 +00:00
Adrian Prantl
8cfc6089e3 Debug info: Gracefully handle anonymous variables.
Found via <rdar://problem/17999350>

Swift SVN r21464
2014-08-26 21:38:31 +00:00