Files
swift-mirror/SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/CMakeLists.txt
Erik Eckstein 3747a2830e Optimizer: add simplification for init_enum_data_addr
Optimize the sequence
```
  %1 = init_enum_data_addr %enum_addr, #someCaseWithPayload
  store %payload to %1
  inject_enum_addr %enum_addr, #someCaseWithPayload
```
to
```
  %1 = enum  $E, #someCaseWithPayload, %payload
  store %1 to %enum_addr
```
This sequence of three instructions must appear in consecutive order.
But usually this is the case, because it's generated this way by SILGen.
2023-05-25 16:28:41 +02:00

27 lines
849 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
SimplifyApply.swift
SimplifyBeginCOWMutation.swift
SimplifyBranch.swift
SimplifyBuiltin.swift
SimplifyCondBranch.swift
SimplifyCondFail.swift
SimplifyDebugStep.swift
SimplifyDestructure.swift
SimplifyGlobalValue.swift
SimplifyInitEnumDataAddr.swift
SimplifyLoad.swift
SimplifyPartialApply.swift
SimplifyStrongRetainRelease.swift
SimplifyStructExtract.swift
SimplifyTupleExtract.swift
SimplifyUncheckedEnumData.swift
SimplifyValueToBridgeObject.swift)