Skip to content
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

Jt redundant tables bug fix #33

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Jt redundant tables bug fix #33

merged 5 commits into from
Jan 30, 2024

Conversation

milica-lazarevic
Copy link
Collaborator

In some cases, certain jump tables may not have any effect on the address of the next branch, making them redundant. This pull request introduces a new feature related to jump tables whose job is to identify such tables and delete them, along with any associated code.

BranchFolder cleanup is required for the new jump table-related feature.
In order for our pass to access the BranchFolding.h header file, it has
been moved to the include/ directory.
A new jump table-related feature is being introduced. Pass and its
related files have been renamed from NanoMipsCompressJumpTables to
NanoMipsOptimizeJumpTablesas a result.
@milica-lazarevic milica-lazarevic marked this pull request as draft September 28, 2023 09:43
@milica-lazarevic milica-lazarevic marked this pull request as ready for review October 18, 2023 12:45
Some jump tables may not have any effect on the address of the following
branch, making them redundant. This optimization pass identifies such
tables and removes any associated code. Pass will then attempt to
compress any remaining jump tables.
The NMOptimizeJumpTables pass has been registered and a relevant
regression test has been added. The test will validate the removal of
redundant jump tables.
llvm/lib/Target/Mips/NanoMipsOptimizeJumpTables.cpp Outdated Show resolved Hide resolved
llvm/lib/Target/Mips/NanoMipsOptimizeJumpTables.cpp Outdated Show resolved Hide resolved
llvm/lib/Target/Mips/NanoMipsOptimizeJumpTables.cpp Outdated Show resolved Hide resolved
llvm/lib/Target/Mips/NanoMipsOptimizeJumpTables.cpp Outdated Show resolved Hide resolved
llvm/lib/Target/Mips/NanoMipsOptimizeJumpTables.cpp Outdated Show resolved Hide resolved
llvm/lib/Target/Mips/NanoMipsOptimizeJumpTables.cpp Outdated Show resolved Hide resolved
llvm/lib/Target/Mips/NanoMipsOptimizeJumpTables.cpp Outdated Show resolved Hide resolved
@djtodoro
Copy link
Collaborator

djtodoro commented Jan 9, 2024

@cme Ping :)

Copy link

@cme cme left a comment

Choose a reason for hiding this comment

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

Looks good.

@cme cme merged commit 4fec89a into nanomips Jan 30, 2024
8 of 18 checks passed
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