Erik Eckstein
f1095556c9
Swift SIL: let var UnaryInstruction.operand return an Operand and not a Value
...
To avoid confusion. Instead add specific getters for unary instructions with dedicated names.
NFC
2023-02-21 17:57:29 +01:00
Erik Eckstein
40ed0fb388
Swift Optimizer: fix a crash when simplifying same-metatype comparisons of function types
...
The instance type of a metatype instruction is not necessarily a legal lowered SIL Type.
Lower the type before converting it to a SILType.
rdar://105502403
2023-02-15 21:14:32 +01:00
Erik Eckstein
85210a4e91
Swift Optimizer: make some SILCombine optimizations available for the "Simplification" pass
...
* begin_cow_mutation
* global_value
* strong_retain and strong_release
So far, those simplifications did only run in SILCombine. Now they are also considered in the swift Simplification pass.
2023-02-09 06:50:05 +01:00
Erik Eckstein
1c70060e01
Swift Optimizer: add Onone simplification of struct_extract instructions
2023-02-09 06:50:05 +01:00
Erik Eckstein
20edeb6a8c
Swift Optimizer: add Onone simplification of unchecked_enum_data instructions
2023-02-09 06:50:05 +01:00
Erik Eckstein
4cf62696b6
Swift Optimizer: add Onone simplification of cond_br instructions
2023-02-09 06:50:05 +01:00
Erik Eckstein
d56ed65718
Swift Optimizer: add Onone simplification of some builtin instructions
...
* `Builtin.isConcrete`
* `Builtin.is_same_metatype`
2023-02-09 06:50:05 +01:00
Erik Eckstein
3f35a1d869
Swift Optimizer: add Onone simplification of branch instructions
2023-02-09 06:50:05 +01:00
Erik Eckstein
f1c6ed681d
Swift Optimizer: add Onone simplification of apply instructions
2023-02-09 06:50:05 +01:00
Erik Eckstein
ea746479ad
SIL Optimizer: rename directory InstructionPasses -> InstructionSimplification
2023-01-16 16:16:51 +01:00