[llvm-dev] [RFC] A new intrinsic, `llvm.blackbox`, to explicitly prevent constprop, die, etc optimizations

Steven Stewart-Gallus via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 9 13:22:54 PST 2015


Hello, I think what you want are intrinsics similar to the following macroes right?

#define PUBLISH_WRITES_TO_VAR(X) __asm__ __volatile__("":: "m"((X)))
#define OBSERVE_WRITES_TO_VAR(X) __asm__ __volatile__("": "=m"((X)))

Thank you,
Steven Stewart-Gallus


More information about the llvm-dev mailing list