[llvm] 51e74e2 - [AArch64] Remove a duplicate call to setHasWinCFI. NFCI.
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 09:03:37 PDT 2020
Author: Martin Storsjö
Date: 2020-10-01T19:03:27+03:00
New Revision: 51e74e21aae8b4e885e23d3f15922a58bc173c34
URL: https://github.com/llvm/llvm-project/commit/51e74e21aae8b4e885e23d3f15922a58bc173c34
DIFF: https://github.com/llvm/llvm-project/commit/51e74e21aae8b4e885e23d3f15922a58bc173c34.diff
LOG: [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
Added:
Modified:
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
index 7f4498da317c..868bb247ed5e 100644
--- a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -1770,8 +1770,6 @@ void AArch64FrameLowering::emitEpilogue(MachineFunction &MF,
if (NeedsWinCFI && HasWinCFI)
BuildMI(MBB, MBB.getFirstTerminator(), DL, TII->get(AArch64::SEH_EpilogEnd))
.setMIFlag(MachineInstr::FrameDestroy);
-
- MF.setHasWinCFI(HasWinCFI);
}
/// getFrameIndexReference - Provide a base+offset reference to an FI slot for
More information about the llvm-commits
mailing list