[llvm-dev] RFC: Add guard intrinsics to LLVM

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 22 21:58:56 PST 2016

On Mon, Feb 22, 2016 at 9:40 PM, Andrew Trick <atrick at apple.com> wrote:
> I actually see fences as a proxy for potential inter-process
> communication and I/O. It's important that any opaque library call
> could contain a fence.

This makes perfect sense to me now, especially if you want to use
@trap_on for safety checks.  Without re-ordering restrictions, a
failed @trap_on will end up looking a lot like UB (since, say, you
could reorder a failing range check across a call to fflush); and so
that would be bad.  You'd still have to be careful around
inaccessiblememonly and friends, though.

-- Sanjoy

More information about the llvm-dev mailing list