mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Optimizer: extract the NamedReturnValueOptimization from CopyForwarding to a separate function pass
This allows to run the NamedReturnValueOptimization only late in the pipeline. The optimization shouldn't be done before serialization, because it might prevent predictable memory optimizations in the caller after inlining.
This commit is contained in:
@@ -400,6 +400,8 @@ SWIFT_FUNCTION_PASS(LateOnoneSimplification, "late-onone-simplification",
|
||||
"Peephole simplifications which can only run late in the -Onone pipeline")
|
||||
SWIFT_FUNCTION_PASS(CleanupDebugSteps, "cleanup-debug-steps",
|
||||
"Cleanup debug_step instructions for Onone")
|
||||
SWIFT_FUNCTION_PASS(NamedReturnValueOptimization, "named-return-value-optimization",
|
||||
"Optimize copies to an indirect return value")
|
||||
PASS(SimplifyBBArgs, "simplify-bb-args",
|
||||
"SIL Block Argument Simplification")
|
||||
PASS(SimplifyCFG, "simplify-cfg",
|
||||
|
||||
Reference in New Issue
Block a user