[PATCH] D70129: [AArch64] [FrameLowering] Allow conditional insertion of CFI instruction
Oliver Stannard (Linaro) via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 06:23:07 PST 2019
ostannard added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:936
MCSymbol *FrameLabel = MMI.getContext().createTempSymbol();
- // Encode the stack size of the leaf function.
- unsigned CFIIndex = MF.addFrameInst(
- MCCFIInstruction::createDefCfaOffset(FrameLabel, -NumBytes));
- BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION))
- .addCFIIndex(CFIIndex)
- .setMIFlags(MachineInstr::FrameSetup);
+ if (needsFrameMoves) {
+ // Encode the stack size of the leaf function.
----------------
This can be folded into the surrounding if statement, i.e. `if (!NeedsWinCFI && needsFrameMoves)`
================
Comment at: llvm/test/CodeGen/AArch64/no_cfi.ll:1
+; RUN: llc -mtriple aarch64-arm-linux-fnu -o - %s | FileCheck %s
+
----------------
s/fnu/gnu/
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70129/new/
https://reviews.llvm.org/D70129
More information about the llvm-commits
mailing list