[PATCH] D41761: Introduce llvm.nospeculateload intrinsic

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 12:07:00 PST 2018


efriedma added a comment.

"When the intrinsic is being executed speculatively"

What does this mean?

LLVM IR defines the semantics of a program only in terms of visible side-effects.  It does not define any semantics for code which does not execute, and it does not provide any guarantees in terms of what data can be leaked via side-channels.  If you're going to attach meaningful semantics to speculationsafeload, you also need to generally define what code the compiler is allowed to emit in blocks which could be speculatively executed.  As an extreme example, there needs to be some rule which prevents the compiler from inserting an attackable load immediately before a call to speculationsafeload.


https://reviews.llvm.org/D41761





More information about the llvm-commits mailing list