Files
swift-mirror/SwiftCompilerSources/Sources/Optimizer/FunctionPasses/CMakeLists.txt
Erik Eckstein 4d20423e00 Optimizer: re-implement the RedundantLoadElimination pass in Swift
The new implementation has several benefits compared to the old C++ implementation:

* It is significantly simpler. It optimizes each load separately instead of all at once with bit-field based dataflow.
* It's using alias analysis more accurately which enables more loads to be optimized
* It avoids inserting additional copies in OSSA

The algorithm is a data flow analysis which starts at the original load and searches for preceding stores or loads by following the control flow in backward direction.
The preceding stores and loads provide the "available values" with which the original load can be replaced.
2023-07-21 07:19:56 +02:00

26 lines
795 B
CMake

# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
swift_compiler_sources(Optimizer
AssumeSingleThreaded.swift
CleanupDebugSteps.swift
ComputeEscapeEffects.swift
ComputeSideEffects.swift
DeadStoreElimination.swift
InitializeStaticGlobals.swift
ObjectOutliner.swift
ObjCBridgingOptimization.swift
MergeCondFails.swift
NamedReturnValueOptimization.swift
RedundantLoadElimination.swift
ReleaseDevirtualizer.swift
SimplificationPasses.swift
StackPromotion.swift
StripObjectHeaders.swift
)