[PATCH] D110869: [X86] Implement -fzero-call-used-regs option
Bill Wendling via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 30 15:31:53 PDT 2021
void added a comment.
Hmm...not working on Linux sounds bad. I'll investigate.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:6116
+
+- ``skip`` doesn't zero any call-used registers.
+- ``used`` only zeros call-used registers used in the function. By ``used``, we
----------------
nickdesaulniers wrote:
> Might be worth a note that `skip` is helpful for disabling previously occurring instances of the command line flag. Sometimes toolchains have wrapper scripts that force on flags, or are built with the implicit default changed, so being able to explicitly disable a feature can be helpful.
Doesn't that apply to all (or most) flags though? I don't think they mention that you can override previously set flags...
================
Comment at: clang/test/Sema/zero_call_used_regs.c:6
+void failure() _zero_call_used_regs(); // expected-error {{takes one argument}}
+void failure() _zero_call_used_regs("used", "used-gpr"); // expected-error {{takes one argument}}
+void failure() _zero_call_used_regs(0); // expected-error {{requires a string}}
----------------
nickdesaulniers wrote:
> How about a test for:
>
> ```
> void failure __attribute__((zero_call_used_reg("used"),zero_call_used_reg("used-gpr")));
> ```
Should that fail? It seems like the second instance of the attribute should override the first one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110869/new/
https://reviews.llvm.org/D110869
More information about the llvm-commits
mailing list