[all-commits] [llvm/llvm-project] 51e74e: [AArch64] Remove a duplicate call to setHasWinCFI....

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Oct 1 09:03:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 51e74e21aae8b4e885e23d3f15922a58bc173c34
      https://github.com/llvm/llvm-project/commit/51e74e21aae8b4e885e23d3f15922a58bc173c34
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-10-01 (Thu, 01 Oct 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

  Log Message:
  -----------
  [AArch64] Remove a duplicate call to setHasWinCFI. NFCI.

The function already has a cleanup scope that calls the same whenever
the function is exited. When reading the code, seeing that this return
codepath has an explicit call while other return paths lack it is
confusing.

In the hypothetical case of a function having a prologue that
set the HasWinCFI flag in the MF, but the epilogue containing no
WinCFI instructions, the HasWinCFI flag in the MF would end up reset back
to false.

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


  Commit: f4b9dfd9bc414a316d997a314b05ac7f9258a722
      https://github.com/llvm/llvm-project/commit/f4b9dfd9bc414a316d997a314b05ac7f9258a722
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-10-01 (Thu, 01 Oct 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
    M llvm/test/CodeGen/AArch64/arm64-windows-calls.ll

  Log Message:
  -----------
  [AArch64] Don't merge sp decrement into later stores when using WinCFI

This matches the corresponding existing case in
AArch64LoadStoreOpt::findMatchingUpdateInsnForward.

Both cases could also be modified to check
MBBI->getFlag(FrameSetup/FrameDestroy) instead of forbidding any
optimization involving SP, but the effect is probably pretty much
the same.

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


Compare: https://github.com/llvm/llvm-project/compare/29ac9fae54c9...f4b9dfd9bc41


More information about the All-commits mailing list