-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New SIL Loop Invariant Code Motion pass #83512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ith e.g. function arguments as a base.
…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
There was a problem hiding this 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
SwiftCompilerSources/Sources/Optimizer/Analysis/DominatorTree.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/Analysis/DominatorTree.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/Analysis/DominatorTree.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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. |
There was a problem hiding this comment.
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.
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
…when iterating through side effects.
@swift-ci apple silicon benchmark |
1 similar comment
@swift-ci apple silicon benchmark |
@swift-ci Please smoke test |
@swift-ci Please smoke test Linux Platform |
@swift-ci Please smoke test |
@swift-ci apple silicon benchmark |
@swift-ci Please Test Source Compatibility Release |
@swift-ci Please test |
@swift-ci Please smoke test |
@swift-ci Please smoke test |
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Show resolved
Hide resolved
# Conflicts: # SwiftCompilerSources/Sources/Optimizer/FunctionPasses/ClosureSpecialization.swift
@swift-ci Please smoke test |
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
SwiftCompilerSources/Sources/Optimizer/FunctionPasses/LoopInvariantCodeMotion.swift
Outdated
Show resolved
Hide resolved
@swift-ci Please smoke test |
@swift-ci Please smoke test |
Superseded by #83988. |
This PR introduces a new SIL loop Invariant Code Motion (licm) pass rewritten in Swift. The goal of the new implementation is to:
tuple_element_addr
andstruct_element_addr
instructions)