<div dir="ltr">I'm not sure if this will do everything that you want, but it controls at least some of these expansions at the Clang level:<div>  tools/clang/lib/Basic/Targets.cpp</div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, May 14, 2013 at 3:46 PM, Dan <span dir="ltr"><<a href="mailto:westdac@gmail.com" target="_blank">westdac@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><br></div><div>I'm working on getting the LLVM/projects/Test-Suite/UnitTest to compile for a target that I am developing.<br></div><div><br></div><div>There is an example: AtomicOps, that uses calls to:</div>

<div><br></div><div>__sync_fetch_and_add</div><div>__sync_val_compare_and_swap</div><div>__sync_lock_test_and_set</div><div><br></div><div>These get converted into llvm IR operations like:</div>
<div><br></div><div>atomicrmw</div><div>cmpxchg</div><div><br></div><div>Is there any way to keep these as function calls, as they are easier to map to the target's eventual functional then having to deal with atomicrmw and cmpxchg</div>

</div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>