This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] [FrameLowering] Allow conditional insertion of CFI instruction
ClosedPublic

Authored by tellenbach on Nov 12 2019, 9:03 AM.

Details

Summary

The insertion of most CFI instructions during AArch64 frame lowering can
be disabled (e.g. using the function attribute nounwind).

This patch enables conditional insertion for one more CFI instruction.

Event Timeline

tellenbach created this revision.Nov 12 2019, 9:03 AM

@ostannard The CFI instruction that can be omitted using this patch is the reason for D69097 (Return address signing for outlined functions) to be buggy, hence I've added you as a reviewer.

ostannard added inline comments.Nov 20 2019, 6:17 AM
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
936

This can be folded into the surrounding if statement, i.e. if (!NeedsWinCFI && needsFrameMoves)

llvm/test/CodeGen/AArch64/no_cfi.ll
1

s/fnu/gnu/

Address review comments.

The unrelated test arm64-blockaddress.ll had to be changed since one
temporary symbol less is generated due to the patch (if nounwind is set). So
Ltmp1 is now Ltmp0.

tellenbach marked 2 inline comments as done.Nov 20 2019, 11:19 AM
This revision is now accepted and ready to land.Nov 21 2019, 2:07 AM
This revision was automatically updated to reflect the committed changes.