forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Better usage of load/store multiple #4
Open
milica-lazarevic
wants to merge
5
commits into
MediaTek-Labs:nanomips-llvm16
Choose a base branch
from
milica-lazarevic:better-usage-of-load/store-multiple
base: nanomips-llvm16
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Better usage of load/store multiple #4
milica-lazarevic
wants to merge
5
commits into
MediaTek-Labs:nanomips-llvm16
from
milica-lazarevic:better-usage-of-load/store-multiple
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
milica-lazarevic
force-pushed
the
better-usage-of-load/store-multiple
branch
from
March 17, 2023 11:33
bd320b5
to
ea54f31
Compare
cme
reviewed
May 31, 2023
@milica-lazarevic what is the status of this? Can we port it to LLVM 16? |
milica-lazarevic
force-pushed
the
better-usage-of-load/store-multiple
branch
from
September 13, 2024 13:23
ea54f31
to
5ce4b7e
Compare
milica-lazarevic
changed the base branch from
nanomips-llvm13
to
nanomips-llvm16
September 13, 2024 13:24
This PR has been ported to LLVM 16. |
djtodoro
reviewed
Sep 16, 2024
milica-lazarevic
force-pushed
the
better-usage-of-load/store-multiple
branch
from
September 16, 2024 11:21
5ce4b7e
to
7c2e46b
Compare
LoadStoreMultiple optimization has been moved to the standalone pass so it can be expanded. Potentially, its position in a pipeline could be changed.
Additional support is added to recognize more sequences. Before, a sequence like this wasn't accepted: lw a1, 4(a0) lw a3, 12(a0) lw a2, 8(a0) Now, when we're sorting instructions by the reg:offset pair internally, the above is accepted.
Beside regular instruction sequence, we're also looking for an instruction sequence that's "missing" one(or more) instruction to be complete and interchangeable with lwm/swm instruction. The sequence is optimizable if the Rt register in missing instruction is available.
We're handling the situation where the instruction sequence is regular, except for one instruction having a "wrong" Rt register number. A sequence like that is optimizable if the register with the expected register number is available. In that case, we're emitting one additional move instruction after lwm/swm.
milica-lazarevic
force-pushed
the
better-usage-of-load/store-multiple
branch
from
September 16, 2024 11:25
7c2e46b
to
5ea10a5
Compare
Since we have confirmed a |
This reverts commit 5ea10a5.
Last commit ("NanoMIPS: NMLoadStoreMultiple add reg gap support") has been temporarily reverted due to a bug. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LoadStoreMultiple optimization has been moved to the standalone pass. Compared to the previous implementation, we regocnize sequences not sorted by the reg:offset pairs as optimizable. Please take a look into the example below:
Now, a sequence like the following is optimizable:
lw a0, 8(a4)
lw a2, 16(a4)
=>lwm a0, 8(a4), 3
lw a1, 12(a4)
Also, there is support for optimizing the following sequences:
lw a0, 8(a4)
lw a1, 12(a4)
=>lwm a0, 8(a4), 4
lw a3, 20(a4)
lw a0, 8(a4)
lw a1, 12(a4)
=>lwm a0, 8(a4), 3
move a3, a2
lw a3, 16(a4)