[all-commits] [llvm/llvm-project] 073156: [MC][RISCV][LoongArch] Add AlignFragment size if l...

Jinyang He via All-commits all-commits at lists.llvm.org
Tue Jan 2 17:28:39 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0731567a31e4ade97c27801045156a88c4589704
      https://github.com/llvm/llvm-project/commit/0731567a31e4ade97c27801045156a88c4589704
  Author: Jinyang He <hejinyang at loongson.cn>
  Date:   2024-01-03 (Wed, 03 Jan 2024)

  Changed paths:
    M llvm/lib/MC/MCExpr.cpp
    A llvm/test/MC/LoongArch/Misc/cfi-advance.s
    M llvm/test/MC/LoongArch/Relocations/relax-addsub.s
    M llvm/test/MC/RISCV/cfi-advance.s
    M llvm/test/MC/RISCV/fixups-expr.s

  Log Message:
  -----------
  [MC][RISCV][LoongArch] Add AlignFragment size if layout is available and not need insert nops (#76552)

Due to delayed decision for ADD/SUB relocations, RISCV and LoongArch may
go slow fragment walk path with available layout. When RISCV (or
LoongArch in the future) don't need insert nops, that means relax is
disabled. With available layout and not needing insert nops, the size of
AlignFragment should be a constant. So we can add it to Displacement for
folding A-B.




More information about the All-commits mailing list