WeZZard
4c479824ef
[SILOptimizer] Eliminate non-case handling for implicit Optional non-Optional casting of unchecked_ref_cast in ValueDefUseWalker.
2025-03-11 09:39:50 +08:00
WeZZard
35f82ba402
[SILOptimizer] Fixes the ValueDefUseWalker to handle potential unchecked_ref_cast between optional and non-optional class types.
...
The `unchecked_ref_cast` is designed to be able to cast between
`Optional<ClassType>` and `ClassType`. We need to handle these cases by
checking if the type is optional and adjust the path accordingly.
2025-03-10 19:17:31 +08:00
Erik Eckstein
aa274a213b
WalkUtils: handle mark_dependence instruction in the ValueUseDefWalker
...
It was already handled in the ValueDefUseWalker
2024-11-28 09:40:13 +01:00
Alexander Cyon
c18a24e499
[SwiftCompilerSources] Fix typos
2024-08-08 22:22:39 -07:00
Erik Eckstein
b739c6263b
WalkUtils: handle unsafe_ref_cast which casts between AnyObject and a class
...
We need to ignore such casts because otherwise the constructed walking path wouldn't contain the right `existential` field kind.
Fixes a miscompile caused by redundant load elimination.
rdar://132364917
2024-07-24 11:35:08 +02:00
Andrew Trick
dfe62b442e
Allow AddressUseDefWalker to continue past MarkUninitializedInst.
...
This makes SwiftCompilerSources address/access utilities consistent with C++ and
allows them to be used in diagnostic passes.
2024-05-14 10:31:24 -07:00
Andrew Trick
4796e55256
SwiftCompilerSources CopyingInstruction
...
And UnmanagedRetain/Release.
2024-01-30 08:38:57 -08:00
Andrew Trick
3f0d309ed4
SwiftCompilerSources: add Sequence.walk()
2023-12-19 02:05:16 -08:00
Erik Eckstein
ec4c815506
SwiftCompilerSources: move WalkUtils and AccessUtils from the Optimizer module to the SIL module
...
Those utilities are conceptually part of the SIL definition.
2023-12-01 19:20:13 +01:00