[all-commits] [llvm/llvm-project] 70a5c5: [ARM][Thumb] Command-line option to ensure AAPCS c...

Lucas Duarte Prates via All-commits all-commits at lists.llvm.org
Mon Jun 27 09:35:24 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 70a5c525349be3ce9ad2bfdf9c995355ba07c864
      https://github.com/llvm/llvm-project/commit/70a5c525349be3ce9ad2bfdf9c995355ba07c864
  Author: Lucas Prates <lucas.prates at arm.com>
  Date:   2022-06-27 (Mon, 27 Jun 2022)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Arch/ARM.cpp
    M llvm/lib/Target/ARM/ARM.td
    M llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
    M llvm/lib/Target/ARM/ARMCallingConv.td
    M llvm/lib/Target/ARM/ARMFrameLowering.cpp
    M llvm/lib/Target/ARM/ARMFrameLowering.h
    M llvm/lib/Target/ARM/ARMMachineFunctionInfo.h
    M llvm/lib/Target/ARM/ARMSubtarget.h
    M llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
    M llvm/lib/Target/ARM/ThumbRegisterInfo.cpp
    A llvm/test/CodeGen/ARM/frame-chain-reserved-fp.ll
    A llvm/test/CodeGen/ARM/frame-chain.ll
    M llvm/test/CodeGen/Thumb/frame-access.ll
    A llvm/test/CodeGen/Thumb/frame-chain-reserved-fp.ll
    A llvm/test/CodeGen/Thumb/frame-chain.ll

  Log Message:
  -----------
  [ARM][Thumb] Command-line option to ensure AAPCS compliant Frame Records

Currently the a AAPCS compliant frame record is not always created for
functions when it should. Although a consistent frame record might not
be required in some cases, there are still scenarios where applications
may want to make use of the call hierarchy made available trough it.

In order to enable the use of AAPCS compliant frame records whilst keep
backwards compatibility, this patch introduces a new command-line option
(`-mframe-chain=[none|aapcs|aapcs+leaf]`) for Aarch32 and Thumb backends.
The option allows users to explicitly select when to use it, and is also
useful to ensure the extra overhead introduced by the frame records is
only introduced when necessary, in particular for Thumb targets.

Reviewed By: efriedma

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




More information about the All-commits mailing list