8000 Optimizer: improve TempLValueOpt by eeckstein · Pull Request #81969 · swiftlang/swift · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Optimizer: improve TempLValueOpt #81969

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

Merged
merged 6 commits into from
Jun 6, 2025

Conversation

eeckstein
Copy link
Contributor
  • re-implement the pass in swift
  • support alloc_stack liveranges which span over multiple basic blocks
  • support load-store pairs, copying from the alloc_stack (in addition to copy_addr)

Those improvements help to reduce temporary stack allocations, especially for InlineArrays.

rdar://151606382

@eeckstein eeckstein requested review from atrick, meg-gupta and nate-chandler and removed request for xymus and adrian-prantl June 4, 2025 07:11
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci apple silicon benchmark

@eeckstein eeckstein force-pushed the temp-lvalue-elimination branch from 5153b34 to 6eedf8e Compare June 4, 2025 11:43
@eeckstein
Copy link
Contributor Author

@swift-ci test

eeckstein added 6 commits June 5, 2025 06:45
…undef` and the `prepareInitialization` and `zeroInitializer` builtins
…nSet`

Instead, remove `Operand.users(ofType:)` which returned a sequence of `Instruction` - which was a kind of replacement for the missing `InstructionSet` API
…tion to OptUtils, so that other passes can use it as well
* re-implement the pass in swift
* support alloc_stack liveranges which span over multiple basic blocks
* support `load`-`store` pairs, copying from the alloc_stack (in addition to `copy_addr`)

Those improvements help to reduce temporary stack allocations, especially for InlineArrays.

rdar://151606382
@eeckstein eeckstein force-pushed the temp-lvalue-elimination branch from 6eedf8e to 2b9b2d2 Compare June 5, 2025 04:46
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci test linux

@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit a33ff98 into swiftlang:main Jun 6, 2025
5 checks passed
@eeckstein eeckstein deleted the temp-lvalue-elimination branch June 6, 2025 13:30
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.

1 participant
0