[PATCH] D100919: [AArch64] Support customizing stack protector guard

Dave Green via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 17 03:35:26 PDT 2021


dmgreen accepted this revision.
dmgreen added a comment.

Thanks. This sounds good to me, if David agrees.



================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:1912
+    if (!SrcReg)
+      report_fatal_error("Unknow SysReg for Stack Protector Guard Register");
+
----------------
-> Unknown


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:1954
+      // than 23760.
+      // It might be nice to use AArch64::MOVi32imm here, which would get
+      // expanded in PreSched2 after PostRA, but our lone scratch Reg already
----------------
It may be possible to do something earlier, where a we add the MOVi32imm earlier before registry allocation and use that as the register for the ldr offset. That would keep it simpler than trying to find scratch registers, and may be optimized better by the pipeline.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100919



More information about the cfe-commits mailing list