Slava Pestov
1b721069d7
SILOptimizer: Teach loop unrolling about more kinds of increment operations
2023-04-12 18:27:50 -04:00
Erik Eckstein
383c52aa35
SIL: rename dealloc_ref [stack] -> dealloc_stack_ref
...
Introduce a new instruction `dealloc_stack_ref ` and remove the `stack` flag from `dealloc_ref`.
The `dealloc_ref [stack]` was confusing, because all it does is to mark the deallocation of the stack space for a stack promoted object.
2022-01-07 16:20:27 +01:00
Andrew Trick
1220c03947
Fix test SILOpt test cases for edge splitting.
2020-11-03 01:40:00 -08:00
Michael Gottesman
fd4828e40a
Eliminate -assume-parsing-unqualified-ownership-sil from tests.
...
I am doing this separately from the actual change to eliminate the option to
make it easier to review.
2018-12-19 12:54:13 -08:00
Erik Eckstein
d42f654aa7
LoopUnroll: handle more variations of the comparison builtin
...
Handle !=, <, <= in addition to ==, >, >=.
This enables loop unrolling if the loop is written as 'while i < e { }'.
rdar://problem/46606173
2018-12-11 13:20:03 -08:00
Slava Pestov
e1f50b2d36
SE-0193: Rename @_inlineable to @inlinable, @_versioned to @usableFromInline
2018-03-30 21:55:30 -07:00
Roman Levenstein
2e5b820063
[sil-loop-unroll] Do not unroll loops if their bodies contain function calls of big functions
...
It is more profitable in most cases to inline the big callee rather than unroll the loop, because unrolling it would create a lot of calls which cannot be further optimized due to increased size of the function containing a loop.
2017-08-22 12:45:22 -07:00
Arnold Schwaighofer
cafe58251e
LoopUnroller: Also handle > exit condition
2017-04-22 20:04:13 -07:00
Arnold Schwaighofer
533044d4c4
LoopUnroller: Teach the loop unroller about >= terminated loops
2017-04-22 17:32:37 -07:00
Michael Gottesman
20dd563efb
[semantic-arc] Update tests for qualified/unqualified ownership and SILGen emission of copy_value, destroy_value.
2016-10-29 20:11:09 -07:00
Erik Eckstein
6924badcc1
SIL: fix a bug which can cause the stack nesting to get broken by loop unrolling
...
We must not unroll a loop with alloc_ref [stack] if a dealloc_stack is outside the loop.
related to rdar://problem/28878079
2016-10-21 09:06:59 -07:00
Dmitri Gribenko
d175b3b66d
Migrate FileCheck to %FileCheck in tests
2016-08-10 23:52:02 -07:00
Arnold Schwaighofer
edf9ca06fc
Unroll loops with known short trip count
...
This enables array value propagation in array literal loops like:
for e in [2,3,4] {
r += e
}
Allowing us to completely get rid of the array.
rdar://19958821
SR-203
2015-12-14 12:03:42 -08:00