Erik Eckstein
ee1c52bc77
Swift SIL: add some APIs
2023-05-22 15:34:26 +02:00
Erik Eckstein
eecea088e7
Swift Bridging: use C++ instead of C bridging for BridgedOperand and BridgedValue
2023-03-21 15:33:09 +01:00
Erik Eckstein
aea26bbc6e
Swift SIL: add a utility protocol NoReflectionChildren for better debug output with lldb po
...
Let's lldb's `po` command not print any "internal" properties of the conforming type.
This is useful if the `description` already contains all the information of a type instance.
2022-10-05 07:37:41 +02:00
Erik Eckstein
4554939dc4
SwiftCompilerSources: consistently use assert instead of precondition
...
It's better to use the new assert implementation (defined in the "Basic" module) than Swift's `precondition`
2022-09-14 14:16:26 +02:00
Erik Eckstein
a17ee435b6
Swift SIL: fix var ApplySite.arguments
...
In case of type-dependent operands, not all operands are part of the arguments
2022-06-08 22:51:57 +02:00
Erik Eckstein
7c71f0091e
Swift SIL: add UseList.isSingleUse
2022-05-12 21:48:37 +02:00
Erik Eckstein
325a0b1f48
swift SIL: add some Instruction, Value and Type APIs
...
* instructions `RefToBridgeObjectInst`, `BridgeObjectToWordInst`, `StringLiteralInst`, `ProjectBoxInst`, `InitEnumDataAddrInst`, `UncheckedTakeEnumDataAddrInst`, `InjectEnumAddrInst`
* protocols `StoringInstruction` and `EnumInstruction`
* load/store-weak/unowned instructions
* `CopyAddrInst.isTakeOfSrc/isInitializationOfDest`
* `ApplySite.calleeArgIndex/callerArgIndex`
* `SILValue.definingInstruction/definingBlock/function`
* `Type.isReferenceCounted`
* `FunctionArgument.isExclusiveIndirectParameter`
* support `CondBranchInst` in `incomingPhiValues`
2022-03-30 14:45:58 +02:00
Rintaro Ishizaki
da6814d510
[SwiftCompiler] Make BridgedArrayRef.data nullable
...
ArrayRef.data() can be nullptr when the array is empty.
2022-02-20 22:30:18 -08:00
Erik Eckstein
345fcbe39a
Improve collections in the swift SIL/Optimizer
...
Improve block/instruction lists and similar collections
* pretty print collections in the form “[a, b, c]”
* also do this for lazy sequences
* define a custom Mirror
* in a collection, only print the name of blocks, functions and globals (instead of the full object)
* replace `BasicBlock.reverseInstructions` with `BasicBlock.instructions.reversed()` - in an efficient way
2022-01-12 15:47:16 +01:00
Erik Eckstein
4beb94c2f9
Rename the libswift directory to SwiftCompilerSources
2021-12-22 09:46:25 +01:00