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

Oliver Stannard (Linaro) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 03:18:09 PDT 2021


ostannard added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp:16
 
+static std::pair<bool, bool> GetSignReturnAddress(const Function &F) {
+  if (!F.hasFnAttribute("sign-return-address")) {
----------------
This could do with a comment explaining the meaning of the two return values.


================
Comment at: llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp:55
+      BranchTargetEnforcement = BTE->getZExtValue();
+    return;
+  }
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112423/new/

https://reviews.llvm.org/D112423



More information about the llvm-commits mailing list