Commit Graph

6 Commits

Author SHA1 Message Date
Erik Eckstein
6c35258f83 Swift SIL: rename parent accessors to parentX, e.g. Instruction.parentBlock
It makes it easier to read
2023-01-16 15:11:34 +01:00
Egor Zhdan
94ec683ba5 Revert "Revert "[cxx-interop][SwiftCompilerSources] Use C++ enums directly from Swift""
This reverts commit 69431f00
2022-10-18 18:55:57 +01:00
eeckstein
69431f00e8 Revert "[cxx-interop][SwiftCompilerSources] Use C++ enums directly from Swift" 2022-09-22 11:45:41 +02:00
Egor Zhdan
5f2a641513 [cxx-interop][SwiftCompilerSources] Use swift::SILWitnessTable::WitnessKind instead of `
SILWitnessTableEntryKind`

rdar://83361087
2022-09-20 12:03:48 +01:00
Erik Eckstein
275861f832 FunctionUses: don't eagerly reserve array capacities in the initializer
Instead do it in `collect`. This allows creating a `FunctionUses` with zero cost - in case `collect` is never called.
2022-09-02 07:11:49 +02:00
Erik Eckstein
a12e33e9e9 Swift Optimizer: add the FunctionUses utility
Provides a list of instructions, which reference a function.

A function "use" is an instruction in another (or the same) function which references the function.
In most cases those are `function_ref` instructions, but can also be e.g. `keypath` instructions.

'FunctionUses' performs an analysis of all functions in the module and collects instructions which reference other functions.
This utility can be used to do inter-procedural caller-analysis.
2022-08-24 17:55:02 +02:00