Erik Eckstein
c20593cd58
Optimizer: better support of OSSA in various optimizations
...
Mainly:
* look through ownership instructions in more places
* support `load_borrow` and `store_borrow` where `load` and `store`s are expected
* support `destructure_struct` where `struct_extract` is expected
* enable inout-keypath optimization for OSSA
* OSSA support in StringOptimization
2026-03-10 07:56:51 +01:00
Anthony Latsis
2bfe2bd587
SIL: Treat -1 as signed when using it to construct an "all bits set" llvm::APInt
...
This should enable us to revert
https://github.com/swiftlang/swift/pull/81464/commits/73c70ee338c515fba37baf3faff93c6389558a5c .
2025-08-27 15:22:30 +01:00
Anthony Latsis
26540ca439
SIL: Do not use -1 to construct a 1-bit llvm::APInt
...
A -1 truncated to 1 bit is just 1, so stop overcomplicating things here.
2025-08-27 12:41:10 +01:00
Erik Eckstein
8666297597
BoundsCheckOpts: handle more integer comparison builtins
...
So far, only negated comparisons (via xor) were handled. Now, also handle simplified comparisons
2025-07-18 07:43:51 +02:00
Meghana Gupta
26277c8363
Add support for bounds check optimization of Span and InlineArray
2025-02-28 17:11:52 -08:00
Meghana Gupta
3fe1029ef8
[NFC] Reorganize and rename ArrayBoundsCheckOpts.cpp
2025-02-28 09:50:58 -08:00