[clang-tools-extra] [NFC][CodeGen] Create method to clear registers (PR #66958)

Bill Wendling via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 13:34:19 PDT 2023


================
@@ -8335,6 +8335,26 @@ bool AArch64InstrInfo::shouldOutlineFromFunctionByDefault(
   return MF.getFunction().hasMinSize();
 }
 
+void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB,
----------------
bwendling wrote:

Yes, in particular I want to call it when deciding when to clear out the register holding the stack protector guard value before exiting the function. It'll probably be during prologue/epilogue mangling, but I think the `TII` is still a nicer place to put it...

https://github.com/llvm/llvm-project/pull/66958


More information about the cfe-commits mailing list