mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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.
27 lines
849 B
CMake
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)
|