[PATCH] D84471: [X86] Fix for ballooning compile times due to Load Value Injection (LVI) mitigations

Matthew Riley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 11:51:56 PDT 2020


mattdr added inline comments.


================
Comment at: llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp:667-669
+  // If `MF` does not have any fences, then no gadgets would have been
+  // mitigated at this point.
+  if (Graph->NumFences > 0) {
----------------
Can we add this as an early-exit case in `trimMitigatedEdges` instead?



================
Comment at: llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp:673-674
+    LLVM_DEBUG(dbgs() << "Eliminating mitigated paths... Done\n");
+    if (Graph->NumGadgets == 0)
+      return 0;
+  }
----------------
Seems like this early-exit case should not have been guarded by the `if`.


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

https://reviews.llvm.org/D84471





More information about the llvm-commits mailing list