<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Mar 25, 2013, at 4:14 PM, Michael Liao <<a href="mailto:michael.liao@intel.com">michael.liao@intel.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Hi Nadav<br><br>Almost miss this. The motivation to hint atomic instruction is that it<br>make programmer's lock primitives (based on atomic instruction) works on<br>both targets with or without HLE support. </div></blockquote><div><br></div><div>I understand, but this can also be done using if-defs in the code or by placing the atomic operation in a library.  </div><div><br></div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">If different intrinsics need providing, we need at least atomicrmw<br>{xchg/add/sub/and/nand/or/xor} and cmpxchg for various data types.<br></div></blockquote><div><br></div><div>Okay. </div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">To propagate HLE hint from LLVM IR into target code generator, I adds<br>HLEHint (2 bits in SubclassData) in atomic node and necessary code to<br>propagate them. Except that, there's nothing fancy.<br></div></blockquote><div><br></div>I understand, but this is added complexity that all of the targets need to maintain.  SelectionDAG is already complex and we don't want to add additional complexity. <br><br></div><div><br></div><div>I still think that target-specific intrinsics is the best way to go. </div></body></html>