[all-commits] [llvm/llvm-project] 63a756: Support relaxation during TLSDESC GD/LD to IE/LE c...

Zhaoxin Yang via All-commits all-commits at lists.llvm.org
Tue Jan 21 22:15:18 PST 2025


  Branch: refs/heads/users/ylzsx/r-got-to-pcrel
  Home:   https://github.com/llvm/llvm-project
  Commit: 63a756b0400fdd287c12d0312ea9d71af3cdd8ed
      https://github.com/llvm/llvm-project/commit/63a756b0400fdd287c12d0312ea9d71af3cdd8ed
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M lld/ELF/Arch/LoongArch.cpp

  Log Message:
  -----------
  Support relaxation during TLSDESC GD/LD to IE/LE conversion.

Complement https://. When relaxation enable, remove redundant NOPs.


  Commit: 99a1e07b7ea77242789744b6fa609d1f0db25603
      https://github.com/llvm/llvm-project/commit/99a1e07b7ea77242789744b6fa609d1f0db25603
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M lld/test/ELF/loongarch-relax-tlsdesc.s

  Log Message:
  -----------
  Modify loongarch-relax-tlsdesc.s.


  Commit: ec07b53a562164b0228dd4fc0650ae7538481e3e
      https://github.com/llvm/llvm-project/commit/ec07b53a562164b0228dd4fc0650ae7538481e3e
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M lld/ELF/Arch/LoongArch.cpp
    M lld/test/ELF/loongarch-relax-pc-hi20-lo12.s

  Log Message:
  -----------
  [lld][LoongArch] GOT indirection to PC relative optimization.

In LoongArch, this optimization is only supported when relaxation is enabled.
From:
 * pcalau12i $a0, %got_pc_hi20(sym_got)
 * ld.w/d $a0, $a0, %got_pc_lo12(sym_got)
To:
 * pcalau12i $a0, %pc_hi20(sym)
 * addi.w/d $a0, $a0, %pc_lo12(sym)

If the original code sequence can be relaxed into a single instruction
`pcaddi`, this patch will not be taken (see https://).
The implementation related to `got` is split into two locations because
the `relax()` function is part of an iteration fixed-point algorithm. We
should minimize it to achieve better linker performance.

FIXME: Althouth the optimization has been performed, the GOT entries still
exists, similarly to AArch64. Eliminating the entries may be require
additional marking in the common code.


  Commit: ef43baeb91a1f1f955f4c6a4aaacacbde8a8c551
      https://github.com/llvm/llvm-project/commit/ef43baeb91a1f1f955f4c6a4aaacacbde8a8c551
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M lld/ELF/Arch/LoongArch.cpp

  Log Message:
  -----------
  Add check for register.


  Commit: e3fc1d625315786c147ea9409fb75f72abe987f3
      https://github.com/llvm/llvm-project/commit/e3fc1d625315786c147ea9409fb75f72abe987f3
  Author: yangzhaoxin <yangzhaoxin at loongson.cn>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M lld/ELF/Arch/LoongArch.cpp

  Log Message:
  -----------
  Delete FIXME according to review.


Compare: https://github.com/llvm/llvm-project/compare/30a9eb5309bb...e3fc1d625315

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list