[PATCH] D80064: [X86] Disable LVI load hardening pass at O0
Scott Constable via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 16:55:40 PDT 2020
sconstab added a comment.
In D80064#2041175 <https://reviews.llvm.org/D80064#2041175>, @jethrogb wrote:
> In D80064#2040163 <https://reviews.llvm.org/D80064#2040163>, @sconstab wrote:
>
> > I can accept this change if the driver can also emit a warning when LVI hardening is enabled with `-O0`. We already have a similar warning when LVI CFI protections are enabled with retpoline. The warning is emitted in clang/lib/Driver/ToolChains/Arch/X86.cpp.
>
>
> IIUC, this warning triggers only on particular command-line settings. However, the pass is activated by a function attribute, which may be enabled in different ways. **I think there should be a warning if there is any function with the attribute but the pass not enabled.**
Is there a way to do this in TargetMachine.cpp? The pass is inserted into the `X86PassConfig`. Is the module accessible at this point?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80064/new/
https://reviews.llvm.org/D80064
More information about the llvm-commits
mailing list