This is an archive of the discontinued LLVM Phabricator instance.

Enable lowering of llvm.speculation_safe_value to DSB/ISB pair.
Needs ReviewPublic

Authored by kristof.beyls on Jul 9 2018, 4:42 AM.

Details

Reviewers
javed.absar
Summary

This is part of implementing a technique to mitigate against Spectre v1,
similar in spirit to what has been proposed by Chandler for X86_64 at
http://lists.llvm.org/pipermail/llvm-dev/2018-March/122085.html.

This patch enables not tracking miss-speculation status, but instead
using a more heavy weight DSB + ISB barrier to implement the semantics
of the llvm.speculation_safe_value intrinsic. This may be beneficial
e.g. when only an infrequently executed part of the code needs to be
protected using manually inserted intrinsics.

Diff Detail