Commit Graph

18 Commits

Author SHA1 Message Date
Anthony Latsis
17fc00f8a7 [test] IRGen: Adjust FileCheck patterns for new nuw attribute in upstream LLVM
This attribute was introduced in
7eca38ce76d5d1915f4ab7e665964062c0b37697 (llvm-project).

Match it using a wildcard regex, since it is not relevant to these
tests.

This is intended to reduce future conflicts with rebranch.
2025-05-04 03:28:56 +01:00
Arnold Schwaighofer
fdb050d2cf IRGen: Fix some test cases for llvm rebranch 2024-05-01 09:30:15 -07:00
Alex Lorenz
4858cb6225 [IRGen][interop] do not add 'nocapture' to not bitwise takable types
The use of 'nocapture' for parameters and return values is incorrect for C++ types, as they can actually capture a pointer into its own value (e.g. std::string in libstdc++)

rdar://115062687
2023-09-25 17:43:34 -07:00
John McCall
fdd3aa7ae6 Translate the pattern type of a pack expansion when emitting
type metadata for layout.

Fixes rdar://110971671
2023-07-20 22:38:38 -04:00
Arnold Schwaighofer
3b5ebaa46c Fix some tests in IRGen folder 2023-06-21 10:10:32 -07:00
Arnold Schwaighofer
c1a93e0bde Move tests over to use the %use_no_opaque_pointers option 2023-06-14 10:49:48 -07:00
Holly Borla
e48a9b5aeb [NFC] Remove the VariadicGenerics flag from tests that don't use generic types
with parameter packs.
2023-04-15 17:48:08 -07:00
John McCall
ce9013a3f6 Fix IRGen to not use outlining for types with any kind of local archetype.
Previously it was testing for opened existentials specifically.

We should really teach outlining to handle local archetypes properly.
We'd have to build a generic signature for the lowered type, and that
probably means also adding requirements that are relevant to value
operations, but it would mean outlining would benefit all types, and
it would let us avoid bundling in unnecessary information from the
enclosing generic environment.

A minor side-effect of this is that we no longer bind names to
opened element type values.  The names were things like \tau_1_0,
which is not very useful, especially in LLVM IR where \tau is
printed with two UTF-8 escapes.
2023-03-10 19:00:28 -05:00
John McCall
7236ece430 Bitcast fixed-sized packs after allocating them.
Clients expect a %swift.opaque**; without the cast, local GEPs will
go off into the weeds.
2023-03-08 11:26:19 -05:00
Sophia Poirier
70cffb06f3 [Variadic Generics] type parameter pack syntax change: T... -> each T 2023-03-02 14:42:28 -08:00
John McCall
d49ab3a762 A couple 32-bit correctness fixes
Fixes rdar://105453258
2023-02-14 12:16:53 -05:00
John McCall
a38478724a Add a pack_length SIL instruction for measuring the length of a pack 2023-02-10 21:50:44 -05:00
nate-chandler
3b4d03c4ed Merge pull request #63513 from nate-chandler/variadic-generics/irgen/alloc_pack
[IRGen] Lowered de/alloc_pack.
2023-02-09 09:57:54 -08:00
Nate Chandler
da5b5c1ea5 [IRGen] Lowered de/alloc_pack. 2023-02-09 07:24:01 -08:00
Nate Chandler
7acc339b90 [IRGen] Lowered tuple_pack_element_addr. 2023-02-09 07:16:15 -08:00
John McCall
27142e42f6 Add SIL instructions to get and set pack elements 2023-02-07 01:10:15 -05:00
Holly Borla
5640d8bc98 [NFC] Require asserts for new variadic generics test. 2023-01-23 09:08:09 -08:00
John McCall
374c202b99 Add SIL instructions to generate pack indices 2023-01-19 23:57:22 -05:00