[PATCH] D132073: [CodeGen] Zero out only modified registers

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 14:40:44 PDT 2022


void created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
void requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Zeroing out used, but not modified, registers can destroy the contents
of non-volatile registers. This can lead to programs crashing in horky
ways.

Because of this, I'm wary of the -fzero-call-used-regs feature with the
"all-*" options. It would have to be used with great care, which means
it probably has an extremely limited use.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132073

Files:
  llvm/lib/CodeGen/PrologEpilogInserter.cpp
  llvm/test/CodeGen/AArch64/zero-call-used-regs.ll
  llvm/test/CodeGen/X86/zero-call-used-regs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132073.453434.patch
Type: text/x-patch
Size: 2964 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220817/35e31fd6/attachment.bin>


More information about the llvm-commits mailing list