This is an aggregation of six other patches that have been submitted separately to add LVI mitigation support to the X86 target, as well as driver support for clang to process new CLI options.
This combines the following diffs:
https://reviews.llvm.org/D75932 [1/6]
https://reviews.llvm.org/D75934 [2/6]
https://reviews.llvm.org/D75935 [3/6]
https://reviews.llvm.org/D75936 [4/6]
https://reviews.llvm.org/D75937 [5/6]
https://reviews.llvm.org/D76158 [6/6]
Note that there is a CLI option to load a plugin that can provide even better optimization, inserting fewer fences, while still mitigating all of the LVI gadgets. The plugin can be found here: https://github.com/intel/lvi-llvm-optimization-plugin, and a description of the pass's behavior with the plugin can be found here: https://software.intel.com/security-software-guidance/insights/optimized-mitigation-approach-load-value-injection.