Commit Graph

12 Commits

Author SHA1 Message Date
Erik Eckstein
27dc5afb10 libswift: add a few utilities
* add the IntegerLiteralInst + the Builder function to create it
* add Value.nonDebugUses
* add a general utility Sequence.isEmpty
* add PassContext.replaceAllUses
* add a function to erase all `debug_value` uses in PassContext.erase
2021-11-29 09:41:05 +01:00
Erik Eckstein
99fb82952a libswift: don't use the internal C++ namespace
Because this can be different in various C++ libraries.

Fixes a build problem on Ubuntu 20.04
2021-11-04 20:03:06 +01:00
Erik Eckstein
7849f09e52 SIL: remove the unused alloc_value_buffer, project_value_buffer and dealloc_value_buffer instructions.
Those instructions were use for the materializeForSet implementation, which was replaced by modify-coroutines.
2021-10-07 07:41:54 +02:00
Erik Eckstein
fc772fff50 libswift: add more instructions and other small utilities
* ApplySite.arguments
* BasicBlock != operator
* some Function argument related properties
* Operand.isTypeDependent
* Type.isTrivial
* bridging of raw_ostream::write
2021-09-24 11:36:41 +02:00
Zoe Carver
6300b8b4f8 Merge pull request #39356 from zoecarver/cxx-interop-lib-swift
[cxx-interop][libswift] Use `std::string` instead of `BridgedStringRef` 🚀
2021-09-23 15:06:19 -04:00
zoecarver
f063701f84 [cxx-interop][libswift] Use std::string instead of BridgedStringRef.
The first C-bridge to be removed! 🚀
2021-09-22 16:13:44 -07:00
Min-Yih Hsu
343d842394 [SIL][DebugInfo] PATCH 3/3: Deprecate debug_value_addr SIL instruciton
This patch removes all references to DebugValueAddrInst class and
debug_value_addr instruction in textual SIL files.
2021-08-31 12:01:04 -07:00
Erik Eckstein
56cfab2b55 libswift: add more instruction classes
And add `UnaryInstruction` which adds a property `operand` to all unary instructions.
This replaces the existing single-operand properties, which simplifies the code.
2021-08-23 10:21:12 +02:00
Erik Eckstein
030e3ef8a3 libswift: add singleDirectResult property to FullApplySite 2021-07-05 13:16:40 +02:00
Erik Eckstein
b175436d07 libswift: add instructions, support block predecessors/successors
Add many new instruction classes in libswift, including all terminator instructions.
This allows to support BasicBlock predecessors and successors.
2021-07-01 16:15:44 +02:00
Erik Eckstein
891f53d1e3 libswift: bridge the MemoryBehavior enum instead of all the mayRead/Write instruction functions 2021-07-01 15:17:51 +02:00
Erik Eckstein
8080465e77 libswift: basic SIL and SIL bridging
This is the initial version of a buildable SIL definition in libswift.
It defines an initial set of SIL classes, like Function, BasicBlock, Instruction, Argument, and a few instruction classes.
The interface between C++ and SIL is a bridging layer, implemented in C.
It contains all the required bridging data structures used to access various SIL data structures.
2021-06-09 11:28:57 +02:00