[PATCH] D84471: [X86] Fix for ballooning compile times due to Load Value Injection (LVI) mitigations
Scott Constable via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 23 15:52:19 PDT 2020
sconstab created this revision.
sconstab added reviewers: mattdr, craig.topper.
Herald added subscribers: jfb, JDevlieghere, hiraditya.
Herald added a project: LLVM.
Fix for the issue raised in https://github.com/rust-lang/rust/issues/74632.
The current heuristic for inserting `LFENCE`s uses a quadratic-time algorithm. This can apparently cause substantial compilation slowdowns for building Rust projects, where functions > 5000 LoC are apparently common.
The updated heuristic in this patch implements a linear-time algorithm. On a set of benchmarks, the slowdown factor for the generated code was comparable (2.55x geo mean for the quadratic-time heuristic, vs. 2.58x for the linear-time heuristic). Both heuristics offer the same security properties, namely, mitigating LVI.
This patch also includes some formatting fixes.
https://reviews.llvm.org/D84471
Files:
llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84471.280277.patch
Type: text/x-patch
Size: 7809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200723/831f83d8/attachment.bin>
More information about the llvm-commits
mailing list