[all-commits] [llvm/llvm-project] 6971c1: [LoongArch] Add support for tail call optimization

wanglei via All-commits all-commits at lists.llvm.org
Sat Nov 19 01:36:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6971c1b3702aba1fea5d3497258df21fb33922a7
      https://github.com/llvm/llvm-project/commit/6971c1b3702aba1fea5d3497258df21fb33922a7
  Author: wanglei <wanglei at loongson.cn>
  Date:   2022-11-19 (Sat, 19 Nov 2022)

  Changed paths:
    M llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
    M llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
    M llvm/lib/Target/LoongArch/LoongArchISelLowering.h
    M llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
    M llvm/lib/Target/LoongArch/LoongArchRegisterInfo.td
    M llvm/test/CodeGen/LoongArch/codemodel-medium.ll
    M llvm/test/CodeGen/LoongArch/nomerge.ll
    A llvm/test/CodeGen/LoongArch/tail-calls.ll

  Log Message:
  -----------
  [LoongArch] Add support for tail call optimization

This patch adds tail call support to the LoongArch backend.  When
appropriate, use the `b` or `jr` instruction for tail calls (the
`pcalau12i+jirl` instruction pair when use medium codemodel).

This patch also modifies the inappropriate operand name:
simm26_bl -> simm26_symbol

This has been modeled after RISCV's tail call opt.

Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D137889




More information about the All-commits mailing list