This is an archive of the discontinued LLVM Phabricator instance.

[ARM] add common parts for PACBTI-M support in the backend

Authored by stuij on Oct 25 2021, 3:18 AM.



This patch encapsulates decision logic about when and how to generate
PAC/BTI related code. It's a part shared by PAC-RET, BTI placement,
build attribute emission, etc, so it make sense committing it
separately in order to unblock the aforementioned parts, which can
proceed concurrently.

This patch adds a few member functions to ARMFunctionInfo, which are currently
unused, therefore there is no testing for them at the moment. This code is
tested in follow-up PAC/BTI code gen patches.

This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:

The PACBTI-M specification can be found in the Armv8-M Architecture Reference

The following people contributed to this patch:

  • Momchil Velikov
  • Ties Stuij

Diff Detail

Event Timeline

stuij created this revision.Oct 25 2021, 3:18 AM
stuij requested review of this revision.Oct 25 2021, 3:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2021, 3:18 AM
ostannard added inline comments.

This could do with a comment explaining the meaning of the two return values.


It would be better to split the BTI stuff out into a separate function too, this early return will make adding anything else to this constructor harder.

stuij updated this revision to Diff 384725.Nov 4 2021, 6:01 AM

addressed review comments: added a comment and split BTI code out of ARMFunctionInfo

stuij marked 2 inline comments as done.Nov 4 2021, 6:02 AM
This revision is now accepted and ready to land.Nov 16 2021, 12:24 AM
This revision was automatically updated to reflect the committed changes.