[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
Mon Mar 27 18:19:48 PDT 2023


benshi001 added a comment.

In D146216#4225135 <https://reviews.llvm.org/D146216#4225135>, @MaskRay wrote:

> Replacing an instruction to two likely makes the execution slower, so I think since we don't implement linker relaxation for AVR, we should not do the jmp/call rewriting as well.

My change is measurable,

1. short jmp/call cost 1 less tick than long jmp/call
2. the nop costs 1 tick.

So the rewriting of call has neither improvement nor regression, since the nop is always executed, so there is no tick/space change.

But the rewriting of jmp does have improvement on time, since the nop is no longer executed, one tick can be saved.


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