Skip to content

Conversation

MAJKFL
Copy link
Contributor

@MAJKFL MAJKFL commented Aug 4, 2025

This PR introduces a new SIL loop Invariant Code Motion (licm) pass rewritten in Swift. The goal of the new implementation is to:

  • Migrate the pass to Swift
  • Simplify and unify the algorithm implementation
  • Explore previously missed optimization opportunities (such as e.g. speculatively hoisting tuple_element_addr and struct_element_addr instructions)
  • Enable support for values with ownership

MAJKFL added 26 commits July 15, 2025 11:51
…essity of running cse sometimes after the pass.
#Conflicts:
#	SwiftCompilerSources/Sources/Optimizer/FunctionPasses/ClosureSpecialization.swift
#	SwiftCompilerSources/Sources/Optimizer/PassManager/Context.swift
#	SwiftCompilerSources/Sources/Optimizer/Utilities/CMakeLists.txt
#	SwiftCompilerSources/Sources/SIL/BasicBlock.swift
#	include/swift/SILOptimizer/OptimizerBridging.h
#	include/swift/SILOptimizer/OptimizerBridgingImpl.h
#	lib/SILOptimizer/Utils/OptimizerBridging.cpp
Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first batch of comments

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the next set of comments

/// "derivative" of the original function.
///
/// VJPs always return a tuple of 2 values -- the original result and the Pullback. Pullbacks are essentially a chain
/// "derivative" of the original function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the formatting changes in this file are not intended.

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 13, 2025

@swift-ci apple silicon benchmark

1 similar comment
@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 14, 2025

@swift-ci apple silicon benchmark

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 15, 2025

@swift-ci Please smoke test

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 15, 2025

@swift-ci Please smoke test Linux Platform

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 18, 2025

@swift-ci Please smoke test

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 18, 2025

@swift-ci apple silicon benchmark

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 18, 2025

@swift-ci Please Test Source Compatibility Release

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 18, 2025

@swift-ci Please test

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 19, 2025

@swift-ci Please smoke test

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 20, 2025

@swift-ci Please smoke test

MAJKFL added 3 commits August 27, 2025 13:17
# Conflicts:
#	SwiftCompilerSources/Sources/Optimizer/FunctionPasses/ClosureSpecialization.swift
@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 27, 2025

@swift-ci Please smoke test

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 28, 2025

@swift-ci Please smoke test

@MAJKFL
Copy link
Contributor Author

MAJKFL commented Aug 28, 2025

@swift-ci Please smoke test

@MAJKFL MAJKFL mentioned this pull request Aug 28, 2025
@MAJKFL MAJKFL closed this Sep 1, 2025
@AnthonyLatsis
Copy link
Collaborator

Superseded by #83988.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants