Commit Graph

4 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
Allan Shortlidge
f827e7c6d3 Tests: Remove -disable-availability-checking in variadic generics tests. 2024-10-20 15:37:15 -07:00
Nate Chandler
c35b86a30d [SILGen] Borrow into in_guaranteed.
Don't create a copy in order to pass a value `@in_guaranteed`.  Just
`store_borrow` the value.

rdar://128710064
2024-06-06 15:45:22 -07:00
John McCall
c66ccbcaa8 Handle variadic generic tuples (both concretely and in abstraction
patterns) in argument positions in reabstraction thunks.

Most of the difficulty in this work continues to center around
(1) trying to reuse as much code as possible between the parameter
and result paths and (2) propagating ownership information as
necessary throughout the code.  I did my best to assert the preconditions
and postconditions here, but undoubtedly I'm missing cases.  Some
simplicity here is still eluding me here.

This patch necessarily changes quite a bit of the code used in
non-variadic paths.  I tried to avoid doing things that I knew would
be risky, like optimizing copies.  I did fail in a few places: e.g.
we should now generate significantly better code when erasing to
Optional<Any>, just because the code was oddly poorly-factored before.
You can see the effect on the function_conversion test case.
2024-01-03 19:25:26 -05:00