Commit Graph

5 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
Joe Groff
dcd432a1bc Turn on substituted SILFunctionTypes by default 2020-02-24 12:14:21 -08:00
Slava Pestov
377d22e757 SILGen: Use the correct generic environment in vtable thunks
Make sure we use the generic environment derived from the
generic signature of the vtable thunk itself, which can now
be different than the generic signature of the derived
method.

This allows vtable thunks that re-abstract generic requirements
to lower all the way through to IRGen.
2020-01-08 22:19:15 -05:00
Harlan Haskins
60523e38b4 [SILGen] Add the IsThunk bit to vtable thunks
Vtable thunks were incorrectly not marked as thunks, which means (among
other things) they're a false positive in the
NonInlinableFunctionSkippingChecker.
2019-10-04 18:00:01 -07:00
Slava Pestov
b4487348d0 SILGen: Support vtable thunks for 'modify' accessors
When checking if a vtable override is ABI compatible with the
base class method, make sure to check yields too.

Also, add support for coroutines to vtable thunks, using code
that I've copy and pasted and tweaked from witness thunks.

(It would be nice to combine witness thunks and vtable thunks
into a single code path for 'method thunks', but that requires
some additional refactoring, so live with the copy and paste
for now).
2019-06-01 00:08:05 -04:00