mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add builtins to generate instructions for tail-allocated arrays in SIL.
Those builtins are: allocWithTailElems_<n>, getTailAddr and projectTailElems Also rename the "gep" builtin, which indexes raw bytes, to "gepRaw" and add a new "gep" builtin to index in a typed array.
This commit is contained in:
@@ -463,6 +463,8 @@ const BuiltinInfo &SILModule::getBuiltinInfo(Identifier ID) {
|
||||
Info.ID = BuiltinValueKind::AtomicLoad;
|
||||
else if (OperationName.startswith("atomicstore_"))
|
||||
Info.ID = BuiltinValueKind::AtomicStore;
|
||||
else if (OperationName.startswith("allocWithTailElems_"))
|
||||
Info.ID = BuiltinValueKind::AllocWithTailElems;
|
||||
else {
|
||||
// Switch through the rest of builtins.
|
||||
Info.ID = llvm::StringSwitch<BuiltinValueKind>(OperationName)
|
||||
|
||||
Reference in New Issue
Block a user