[LLVMdev] Lowering Atomic Load to Acquire and Load

Sam Cristall cristall at eleveneng.com
Thu Aug 1 12:36:06 PDT 2013


I'm working with an experimental backend for an MCU with heavy 
multithreading capabilities but lacks proper acquire/release semantics.  
This is okay, as the programmer can customize __cxa_guard_acquire and 
__cxa_guard_release to lower/raise appropriate semaphores.  The issue 
I'm having is that I can't seem to figure out when to lower atomic load 
into an acquire/load pair early enough that the __cxa_guard_acquire is 
evaluated for optimization (most importantly inlining.)  First, is this 
even the proper way to do this and further am I going about this the 
wrong way and is there a "best time" to do a pass to catch these guys?

Thanks!

-Sam




More information about the llvm-dev mailing list