Go to file
Chandler Carruth fa065aa75c [x86/SLH] Completely rework how we sink post-load hardening past data
invariant instructions to be both more correct and much more powerful.

While testing, I continued to find issues with sinking post-load
hardening. Unfortunately, it was amazingly hard to create any useful
tests of this because we were mostly sinking across copies and other
loading instructions. The fact that we couldn't sink past normal
arithmetic was really a big oversight.

So first, I've ported roughly the same set of instructions from the data
invariant loads to also have their non-loading varieties understood to
be data invariant. I've also added a few instructions that came up so
often it again made testing complicated: inc, dec, and lea.

With this, I was able to shake out a few nasty bugs in the validity
checking. We need to restrict to hardening single-def instructions with
defined registers that match a particular form: GPRs that don't have
a NOREX constraint directly attached to their register class.

The (tiny!) test case included catches all of the issues I was seeing
(once we can sink the hardening at all) except for the NOREX issue. The
only test I have there is horrible. It is large, inexplicable, and
doesn't even produce an error unless you try to emit encodings. I can
keep looking for a way to test it, but I'm out of ideas really.

Thanks to Ben for giving me at least a sanity-check review. I'll follow
up with Craig to go over this more thoroughly post-commit, but without
it SLH crashes everywhere so landing it for now.

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

llvm-svn: 337177
2018-07-16 14:58:32 +00:00
clang [ASTImporter] Changed constant int to unsigned int in test code. 2018-07-16 14:05:18 +00:00
clang-tools-extra [clang-tidy] Force exceptions to be enabled in test 2018-07-14 10:48:06 +00:00
compiler-rt Test commit 2018-07-16 14:54:29 +00:00
debuginfo-tests [debuginfo-tests] Always use the system python to invoke llgdb.py. 2018-06-10 19:38:26 +00:00
libclc atom: Use volatile pointers for cl_khr_{global,local}_int32_{base,extended}_atomics 2018-06-21 19:27:39 +00:00
libcxx [CMake] Use correct variable as header install prefix 2018-07-15 04:09:35 +00:00
libcxxabi [CMake] Set per-runtime library directory suffix in runtimes build 2018-07-10 19:13:33 +00:00
libunwind [CMake] Set per-runtime library directory suffix in runtimes build 2018-07-10 19:13:33 +00:00
lld attempt to get test/COFF/driver.test passing on sanitizer-x86_64-linux-fast; cf r337092 2018-07-14 11:47:23 +00:00
lldb Fix TestDataFormatterUnordered for older libc++ versions 2018-07-16 14:37:58 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm [x86/SLH] Completely rework how we sink post-load hardening past data 2018-07-16 14:58:32 +00:00
openmp [cmake] Fix libomptarget/test/CMakeLists.txt 2018-07-15 17:29:43 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [Polly][isl] Add neutrally-named accessors to isl list elements and sizes 2018-07-13 22:05:01 +00:00
README.md

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.