<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)"><span class="gmail-"><br><blockquote style="border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255);margin-left:5px;padding-left:5px;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;font-family:helvetica,arial,sans-serif;font-size:12pt"><div dir="ltr"><div></div><div>A primary drawback in the above patch is the static use of Cache Line Size. I wish to get this data from tblgen/TTI and I am happy to submit patches on it.</div></div></blockquote></span>Yes, this sounds like the right direction. The targets obviously need to provide this information.</div></div></blockquote><div><br></div><div>I'd like to help review this as it'll be necessary to implement <a href="http://wg21.link/p0154r1">http://wg21.link/p0154r1</a> which is (likely) in C++17. It adds two values, <font face="monospace, monospace">constexpr std::hardware_{constructive,destructive}_interference_size</font>, because in some configurations you don't have a precise cacheline size but rather a range based on what multiple architectures have implemented for the same ISA. I think you'll want something similar.</div></div></div></div>