1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/lib/Bitcode/Reader
Chandler Carruth 0e44a1b235 [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative
Load Hardening.

Wires up the existing pass to work with a proper IR attribute rather
than just a hidden/internal flag. The internal flag continues to work
for now, but I'll likely remove it soon.

Most of the churn here is adding the IR attribute. I talked about this
Kristof Beyls and he seemed at least initially OK with this direction.
The idea of using a full attribute here is that we *do* expect at least
some forms of this for other architectures. There isn't anything
*inherently* x86-specific about this technique, just that we only have
an implementation for x86 at the moment.

While we could potentially expose this as a Clang-level attribute as
well, that seems like a good question to defer for the moment as it
isn't 100% clear whether that or some other programmer interface (or
both?) would be best. We'll defer the programmer interface side of this
for now, but at least get to the point where the feature can be enabled
without relying on implementation details.

This also allows us to do something that was really hard before: we can
enable *just* the indirect call retpolines when using SLH. For x86, we
don't have any other way to mitigate indirect calls. Other architectures
may take a different approach of course, and none of this is surfaced to
user-level flags.

Differential Revision: https://reviews.llvm.org/D51157

llvm-svn: 341363
2018-09-04 12:38:00 +00:00
..
BitcodeReader.cpp [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative 2018-09-04 12:38:00 +00:00
BitReader.cpp Remove redundant includes from lib/Bitcode. 2017-12-13 21:30:45 +00:00
BitstreamReader.cpp Change BitstreamCursor::skipRecord to return the record code (NFC) 2017-01-04 22:54:14 +00:00
CMakeLists.txt Refactor BitcodeReader: move Metadata and ValueId handling in their own class/file 2016-12-12 19:34:26 +00:00
LLVMBuild.txt
MetadataLoader.cpp DebugInfo: Add metadata support for disabling DWARF pub sections 2018-08-16 21:29:55 +00:00
MetadataLoader.h [NFC] Fix typo 2018-08-06 05:03:21 +00:00
ValueList.cpp Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
ValueList.h [Bitcode] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-09-07 23:28:24 +00:00