[all-commits] [llvm/llvm-project] ab94fb: [RISCV] Prefer Zcmp push/pop instead of save-resto...

Yeting Kuo via All-commits all-commits at lists.llvm.org
Tue Sep 19 18:16:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab94fbba572cd50a1e85dbc023915b1f76b98106
      https://github.com/llvm/llvm-project/commit/ab94fbba572cd50a1e85dbc023915b1f76b98106
  Author: Yeting Kuo <46629943+yetingk at users.noreply.github.com>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h
    M llvm/test/CodeGen/RISCV/push-pop-popret.ll

  Log Message:
  -----------
  [RISCV] Prefer Zcmp push/pop instead of save-restore calls. (#66046)

Zcmp push/pop can reduce more code size then save-restore calls. There
are two reasons,
1. Call for save-restore calls needs 4-8 bytes, but Zcmp push/pop only
needs 2 bytes.
2. Zcmp push/pop can also handles small shift of sp.




More information about the All-commits mailing list