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

[英雄贴] Binutils: Optimize loongarch_elf_relax_section #56

Open
xry111 opened this issue Jun 21, 2024 · 0 comments
Open

[英雄贴] Binutils: Optimize loongarch_elf_relax_section #56

xry111 opened this issue Jun 21, 2024 · 0 comments
Labels
AREA: Toolchain 英雄帖 Volunteers welcome!

Comments

@xry111
Copy link
Member

xry111 commented Jun 21, 2024

Currently loongarch_elf_relax_section may invoke loongarch_relax_delete_bytes O(n) times, and loongarch_relax_delete_bytes just invokes memmove which is O(n) too. Thus we have a quadratic behavior.

Note that a simple "mark and sweep" will make offsets wrong and generate wrong code (that's why we moved away from R_LARCH_DELETE). We need a balanced binary tree to maintain the offset change efficiently.

@xen0n xen0n added 英雄帖 Volunteers welcome! AREA: Toolchain labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: Toolchain 英雄帖 Volunteers welcome!
Projects
None yet
Development

No branches or pull requests

2 participants