John McCall
159c653780
Add the tuple_pack_element_addr SIL instruction.
...
This allows dynamically indexing into tuples. IRGen not yet
implemented.
I think I'm going to need a type_refine_addr instruction in
order to handle substitutions into the operand type that
eliminate the outer layer of tuple-ness. Gonna handle that
in a follow-up commit.
2023-02-07 23:22:35 -05:00
Nate Chandler
cd7e675bce
[IRGen] Bind wtables at open_pack_element.
...
Call out to the infrastructure for emitting witness table packs to emit
references to individual witness tables when binding opened archetypes
during open_pack_element.
2023-02-07 12:40:46 -08:00
swift-ci
078a588ac0
Merge remote-tracking branch 'origin/main' into rebranch
2023-02-07 08:52:59 -08:00
Meghana Gupta
75a9137f89
Enclose with begin_access[signed]/end_access during SILGen of implicit value ctor
2023-02-07 00:17:32 -08:00
John McCall
27142e42f6
Add SIL instructions to get and set pack elements
2023-02-07 01:10:15 -05:00
swift-ci
a61d2ef868
Merge remote-tracking branch 'origin/main' into rebranch
2023-02-02 20:36:01 -08:00
nate-chandler
7b317c0f1e
Merge pull request #63363 from nate-chandler/variadic-generics/irgen/open_pack_element
...
[IRGen] Lowered open_pack_element.
2023-02-02 20:26:29 -08:00
Nate Chandler
a442245925
[IRGen] Lowered open_pack_element.
2023-02-02 12:48:40 -08:00
swift-ci
9fd0ce37f4
Merge remote-tracking branch 'origin/main' into rebranch
2023-02-01 18:53:37 -08:00
John McCall
6bf9ac858b
Add instructions to allocate and deallocate packs.
...
Having added these, I'm not entirely sure we couldn't just use
alloc_stack and dealloc_stack. Well, if we find ourselves adding
a lot of redundancy with those instructions (e.g. around DI), we
can always go back and rip these out.
2023-01-31 22:39:34 -05:00
swift-ci
8ec181f456
Merge remote-tracking branch 'origin/main' into rebranch
2023-01-27 14:14:10 -08:00
Meghana Gupta
1dac5d48d3
Support for address discriminated pointers
2023-01-27 01:56:44 -08:00
swift-ci
df75f6ee09
Merge remote-tracking branch 'origin/main' into rebranch
2023-01-25 22:33:52 -08:00
swift-ci
281088eb73
Merge pull request #63204 from meg-gupta/ptrauthcodegenpr
...
Initial support for ptrauth qualified function pointers in C
2023-01-25 22:19:34 -08:00
Meghana Gupta
901c279bea
Add IRGen support for reads and writes to imported __ptrauth qualified field function pointers
...
Access to such pointers are protected by begin_access [signed]/end_access.
Generate code to auth/sign them before access.
2023-01-25 14:03:19 -08:00
Meghana Gupta
ba052abec1
Add signed access enforcement to begin_access
...
This will be used for supporting imported c function pointers with custom __ptrauth qualifier.
2023-01-25 14:03:15 -08:00
swift-ci
8ec1f5847b
Merge remote-tracking branch 'origin/main' into rebranch
2023-01-20 10:30:05 -08:00
John McCall
374c202b99
Add SIL instructions to generate pack indices
2023-01-19 23:57:22 -05:00
John McCall
4391d159b7
[NFC] Convenience for setting a singleton explosion
2023-01-19 23:57:13 -05:00
swift-ci
a7e782f78b
Merge remote-tracking branch 'origin/main' into rebranch
2023-01-11 10:24:35 -08:00
John McCall
9aeddd0b41
Merge pull request #62955 from rjmccall/open_pack_element
...
Add the open_pack_element instruction
2023-01-11 13:17:46 -05:00
swift-ci
5df3e6ca80
Merge remote-tracking branch 'origin/main' into rebranch
2023-01-11 01:56:51 -08:00
John McCall
37baf9b2dc
Add a SIL instruction to open a pack as an element archetype
...
IRGen not yet done.
2023-01-11 03:11:30 -05:00
Konrad `ktoso` Malawski
54dec38a34
initial complete impl
2023-01-05 16:19:05 +09:00
swift-ci
f476abf4a1
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-20 17:13:36 -08:00
Pavel Yaskevich
0c5e133ab4
[IRGen] Add runtime accessible functions to a special section
2022-12-20 09:45:01 -08:00
swift-ci
c8bcfcc57f
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-16 18:34:15 -08:00
Adrian Prantl
a9f0b2a84f
Remove StorageType from DebugTypeInfo::getErrorResult().
...
Error results are always indirect so passing in the llvm storage type (which is
always a pointer) is entirely pointless.
rdar://103416237
2022-12-16 13:32:48 -08:00
swift-ci
2a6e9d30eb
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-14 19:54:28 -08:00
swift-ci
9eb3adb69e
Merge pull request #62591 from adrian-prantl/fixed-buffer
...
Sink isFixedBuffer into DebugTypeInfo and ensure the enclosed types
2022-12-14 19:51:26 -08:00
Adrian Prantl
06a54432ab
Sink isFixedBuffer into DebugTypeInfo and ensure the enclosed types aren't
...
emitted with the size of the fixed buffer.
2022-12-14 14:18:28 -08:00
swift-ci
d9031ef308
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-13 19:12:55 -08:00
Slava Pestov
57eeb1894d
Merge pull request #62548 from slavapestov/irgen-pack-shape
...
IRGen: Preliminary support for working with pack shapes
2022-12-13 22:08:54 -05:00
swift-ci
dcfb01cfb3
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-13 09:16:29 -08:00
Slava Pestov
6e31af6dda
IRGen: Simplify enumerateFulfillments()
2022-12-13 11:56:33 -05:00
Adrian Prantl
2dc75858ae
Merge pull request #62542 from adrian-prantl/task-alloc
...
Fix IRGen debug info for swift_task_alloc'ed variables.
2022-12-13 08:55:49 -08:00
Adrian Prantl
e67d8bf4e3
Fix IRGen debug info for swift_task_alloc'ed variables.
...
The old code attempted to load the variable despite not knowing its size. Fixed
by describing the variable's address on the task heap.
2022-12-12 17:19:49 -08:00
swift-ci
328e716489
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-12 07:33:19 -08:00
Nate Chandler
8d8577e5b0
[SIL] Removed Indirect_In_Constant convention.
...
It is no different from @in.
Continue parse @in_constant in textual and serialized SIL, but just as
an alias for @in.
2022-12-09 21:54:00 -08:00
swift-ci
b2dc50cc25
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-06 17:33:32 -08:00
Arnold Schwaighofer
0ca27df7fc
IRGen: Fix a use-after-free error in ShadowStackSlots creation
...
The `ShadowStackSlots` map uses a `StringRef` to the `SmallString<4>` entry in
the `AnonymousVariables` map. When `AnonymousVariables` is resized the pointer
to the inline string entry will no longer be valid.
No reproducer.
rdar://102982240
2022-12-06 12:28:58 -08:00
swift-ci
efef52a86e
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-28 09:33:40 -08:00
Erik Eckstein
ab1b343dad
use new llvm::Optional API
...
`getValue` -> `value`
`getValueOr` -> `value_or`
`hasValue` -> `has_value`
`map` -> `transform`
The old API will be deprecated in the rebranch.
To avoid merge conflicts, use the new API already in the main branch.
rdar://102362022
2022-11-21 19:44:24 +01:00
Rintaro Ishizaki
d458c8b74a
Merge remote-tracking branch 'origin/main' into rebranch
...
Conflicts:
include/swift/Sema/ConstraintSystem.h
include/swift/Syntax/AbsoluteRawSyntax.h
include/swift/Syntax/Syntax.h
include/swift/Syntax/SyntaxData.h
lib/DependencyScan/ModuleDependencyCacheSerialization.cpp
lib/Syntax/SyntaxFactory.cpp.gyb
lib/Syntax/SyntaxNodes.cpp.gyb
tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp
tools/swift-syntax-test/swift-syntax-test.cpp
2022-11-18 09:37:38 -08:00
Xi Ge
c5a7eff0c9
Merge pull request #62147 from tshortli/has-symbol-sil-instruction
2022-11-18 04:34:24 -08:00
Allan Shortlidge
ae32b8e148
IRGen: Implement lowering of has_symbol SIL instruction.
2022-11-16 16:07:29 -08:00
Allan Shortlidge
0a24042cdd
SIL: Introduce the has_symbol SIL instruction.
2022-11-16 16:07:26 -08:00
Arnold Schwaighofer
a667c7348f
DebugInfo: Fix shadow variable emisson for non-loadable types
...
rdar://102157827
2022-11-16 12:34:39 -08:00
swift-ci
6bb167f353
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-14 23:34:22 -08:00
Erik Eckstein
190fea8acc
IRGen: getPointerElementType -> getNonOpaquePointerElementType
...
`getPointerElementType` is deprecated in a newer LLVM.
2022-11-14 20:36:09 +01:00