llvm-project/compiler-rt/test
Peter Collingbourne 2974856ad4 Use branch funnels for virtual calls when retpoline mitigation is enabled.
The retpoline mitigation for variant 2 of CVE-2017-5715 inhibits the
branch predictor, and as a result it can lead to a measurable loss of
performance. We can reduce the performance impact of retpolined virtual
calls by replacing them with a special construct known as a branch
funnel, which is an instruction sequence that implements virtual calls
to a set of known targets using a binary tree of direct branches. This
allows the processor to speculately execute valid implementations of the
virtual function without allowing for speculative execution of of calls
to arbitrary addresses.

This patch extends the whole-program devirtualization pass to replace
certain virtual calls with calls to branch funnels, which are
represented using a new llvm.icall.jumptable intrinsic. It also extends
the LowerTypeTests pass to recognize the new intrinsic, generate code
for the branch funnels (x86_64 only for now) and lay out virtual tables
as required for each branch funnel.

The implementation supports full LTO as well as ThinLTO, and extends the
ThinLTO summary format used for whole-program devirtualization to
support branch funnels.

For more details see RFC:
http://lists.llvm.org/pipermail/llvm-dev/2018-January/120672.html

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

llvm-svn: 327163
2018-03-09 19:11:44 +00:00
..
BlocksRuntime
asan [asan] Try to unbreak arm build bots by only running the test on 2018-03-09 12:26:29 +00:00
builtins [PATCH] [compiler-rt, RISCV] Support builtins for RISC-V 2018-03-01 07:47:27 +00:00
cfi Use branch funnels for virtual calls when retpoline mitigation is enabled. 2018-03-09 19:11:44 +00:00
dfsan [mips] XFAIL dfsan's custom.cc test on mips64. 2017-05-09 19:17:16 +00:00
esan [tsan] Update unittest for logging changes of r308637 2017-07-20 20:06:00 +00:00
fuzzer [Fuzzer] Avoid the unnecessary rebuild of the custom libc++ 2018-03-07 18:14:09 +00:00
hwasan [hwasan] An LLVM flag to disable stack tag randomization. 2018-01-13 01:32:15 +00:00
interception Revert "[interception] Check for export table's size before referring to its elements." 2017-01-22 03:30:14 +00:00
lsan [lsan] Respect log_path option in standalone LSan 2018-01-22 09:30:27 +00:00
msan [sanitizer] Add interceptors for wcsxfrm, wcsxfrm_l 2018-03-07 00:14:12 +00:00
profile [profile] Test the exported symbol set for empty programs 2018-02-28 19:00:16 +00:00
safestack Factor out "stable-runtime" feature and enable it on all android. 2017-10-10 23:37:26 +00:00
sanitizer_common Disable tests from r326852 on Darwin 2018-03-07 05:33:37 +00:00
scudo [scudo] Make logging more consistent 2018-03-07 16:22:16 +00:00
tsan [Fuzzer] Avoid the unnecessary rebuild of the custom libc++ 2018-03-07 18:14:09 +00:00
ubsan [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274) 2018-01-17 12:26:04 +00:00
ubsan_minimal [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274) 2018-01-17 12:26:04 +00:00
xray [XRay][compiler-rt] Add APIs for processing logs in memory 2018-03-07 02:45:14 +00:00
CMakeLists.txt Allow compiler-rt test targets to work with multi-config CMake generators 2017-11-13 12:57:54 +00:00
lit.common.cfg Fix which Darwin versions have ObjC runtime with full subscripting support. 2018-02-26 23:04:57 +00:00
lit.common.configured.in [ubsan] Re-commit: lit changes for lld testing, future lto testing. 2017-12-01 19:36:29 +00:00