Optimizer: remove the ArrayElementPropagation optimization

Propagating array element values is done by load-simplification and redundant-load-elimination.
So ArrayElementPropagation is not needed anymore.

ArrayElementPropagation also replaced `Array.append(contentsOf:)` with individual `Array.append` calls.
This optimization is removed, because the benefit is questionably, anyway.
In most cases it resulted in a code size increase.
This commit is contained in:
Erik Eckstein
2024-11-22 12:40:33 +01:00
parent e3df3da8a9
commit 63f6a2f30d
10 changed files with 64 additions and 1403 deletions

View File

@@ -120,8 +120,6 @@ IRGEN_PASS(AllocStackHoisting, "alloc-stack-hoisting",
"SIL alloc_stack Hoisting")
PASS(ArrayCountPropagation, "array-count-propagation",
"Array Count Propagation")
PASS(ArrayElementPropagation, "array-element-propagation",
"Array Element Propagation")
SWIFT_FUNCTION_PASS(AssumeSingleThreaded, "sil-assume-single-threaded",
"Assume Single-Threaded Environment")
SWIFT_MODULE_PASS(AsyncDemotion, "async-demotion",