[PATCH] D79910: [x86][seses] Add clang flag; Use lvi-cfi with seses

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 14:12:59 PDT 2020


craig.topper added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/X86.cpp:200
+    if (!Args.hasArg(options::OPT_mno_lvi_cfi)) {
+      Features.push_back("+lvi-cfi");
+      LVIOpt = options::OPT_mlvi_cfi;
----------------
sconstab wrote:
> zbrid wrote:
> > sconstab wrote:
> > > Would it be better to add `FeatureLVIControlFlowIntegrity` as a dependency for `FeatureSpeculativeExecutionSideEffectSuppression` in `llvm/lib/Target/X86/X86.td`?
> > Thanks for the tip! Yeah, I will update to do that, but it looks like that only ensures an error will be thrown if they aren't used together rather than ensuring one is enabled when the other is enabled. Am I misunderstanding?
> I'm not certain about this either. @craig.topper opinion?
Making them dependent in X86.td will make +sese imply +lvi-cfi and make -lvi-cfi imply -sese. So sese can never be enabled without lvi-cfi also enabled.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79910





More information about the cfe-commits mailing list