[PATCH] D85649: [AArch64] PAC/BTI code generation for LLVM generated functions

David Tellenbach via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 06:25:19 PDT 2020


tellenbach added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:5764
+  const auto &MFIa = a.getMF()->getInfo<AArch64FunctionInfo>();
+  const auto &MFIb = a.getMF()->getInfo<AArch64FunctionInfo>();
 
----------------
Is this a typo?




================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:5774
+  const auto &MFIa = a.getMF()->getInfo<AArch64FunctionInfo>();
+  const auto &MFIb = a.getMF()->getInfo<AArch64FunctionInfo>();
 
----------------
Same.


================
Comment at: llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h:149
+  /// SignWithBKey enables use of the B keyfor PAC-RET, otherwise use A key.
+  bool SignWithBKey;
+
----------------
The key type could in fact also be made an enum just like you did for the type of return address signing but no strong opinion here.


================
Comment at: llvm/test/CodeGen/AArch64/pacbti-llvm-generated-funcs-1.ll:25
+
+attributes #0 = { noinline nounwind optnone sanitize_address uwtable "branch-target-enforcement" "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="non-leaf" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon,+v8.3a" "unsafe-fp-math"="false" "use-soft-float"="false" }
+
----------------
Do you need all of these attributes for the test case?


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

https://reviews.llvm.org/D85649



More information about the llvm-commits mailing list