[PATCH] D146216: [lld][ELF] Relax long jump/call to short jump/call on AVR
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 19 00:48:20 PDT 2023
benshi001 marked an inline comment as done.
benshi001 added inline comments.
================
Comment at: lld/ELF/Arch/AVR.cpp:245
+// rjmp _foo ; 2-byte instruction
+// nop ; 2-byte instruction
+bool AVR::tryRelaxLongJumpCall(uint8_t *loc, uint64_t callAddr,
----------------
MaskRay wrote:
> benshi001 wrote:
> > Is there any better we can remove this nop ? I can only figure out the way by `memcpy` `uint8_t *loc` .
> I implemented this for RISC-V but I am unsure we should get the complexity for the less-used AVR port. This complexity is exactly what I called out in a previous patch and you said that you did not intend to implement it.
I see. I will not pursue removing the `NOP` any more.
And I think current form `long jump` -> `short jump + nop` is simple enough, at least 1 cycle is saved. Hopefully you will accept. ^_^
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146216/new/
https://reviews.llvm.org/D146216
More information about the llvm-commits
mailing list