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

Lucas Duarte Prates via All-commits all-commits at lists.llvm.org
Tue Jun 14 05:38:03 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7625e01d661644a560884057755d48a0da8b77b4
  Author: Lucas Prates <lucas.prates at arm.com>
  Date:   2022-06-14 (Tue, 14 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