<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Verdana",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:768428851;
        mso-list-type:hybrid;
        mso-list-template-ids:794582818 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><a name="_MailEndCompose"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">As you say, it is holiday season and many people (including Johnny) are on vacation.<o:p></o:p></span></a></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">I am nervous about committing a change and then immediately going on holiday myself, (especially when the ball was in your court on these patches
 that are now so urgent for ~6 weeks).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Having a buildbot is great, especially if it is pushing results somewhere public, but surely your buildbot should only need a one line change to
 choose which repository to check out from, so you can do most of the work to get it running with it looking at your internal tree, and then switch to the LLVM tree easily once it’s all running.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">More generally (and not needed for these patches, but so you can see where we’re going), I’d like to tidy up the way we’re handling the multiple
 architectures to make the code cleaner and porting easier. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">At the moment we’re growing long #if chains like<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">#if KMP_OS_LINUX && (KMP_ARCH_X86 || KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">which are hard to read and hard to get right.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">I’d like to fix that in two ways<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">   
</span></span></span><![endif]><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Have #defines for the high level, generic architectures, e.g.<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">KMP_ARCH_X86_ANY, KMP_ARCH_ARM_ANY, KMP_ARCH_PPC_ANY</span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">,
 …<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">These would then be defined in terms of the possible architectures they represent, something like<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">#define KMP_ARCH_X86_ANY (KMP_ARCH_X86 || KMP_ARCH_X86_64)<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">#define KMP_ARCH_ARM_ANY (KMP_ARCH_ARM || KMP_ARCH_AARCH64)<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">#define KMP_ARCH_PPC_ANY (KMP_ARCH_PPC || KMP_ARCH_PPC64)     // or might be PPC32 || PPC?<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">For PPC we’d also have the endian options one level down within KMP_ARCH_PPC64, which would be
<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">#define KMP_ARCH_PPC64 (KMP_ARCH_PPC64_LE || KMP_ARCH_PPC64_BE)<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">That would allow us to shorten the long chains like that above, which would then be<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">#if KMP_OS_LINUX && (KMP_ARCH_X86_ANY || KMP_ARCH_ARM_ANY)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">which is somewhat better, but I’d also like to add the second change…<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">   
</span></span></span><![endif]><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Define some more functional/property style macros, so, for instance, that big if above is actually being used for the concept of “Does
 this system support futexes?”. I’d rather have a macro for that concept, which could then be defined in the architecture header, something like<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">#define KMP_HAVE_FUTEX (KMP_OS_LINUX && (KMP_ARCH_X86_ANY || KMP_ARCH_ARM_ANY))<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">(or, alternatively, which might be better, have a single #if section for each architecture that defines its capabilities as 1 or 0)<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">The code in kmp_csupport.c that’s worried about futexes would then just have<o:p></o:p></span></p>
<p class="MsoListParagraph"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D">#if (KMP_HAVE_FUTEX)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">This ought to make porting much simpler, since you wouldn’t need to look at every #if in the code that tests an architecture flag to see if your
 new architecture needs to be added, but just set the appropriate capability macros for the architecture you have and worry about any really machine specific code (which should get caught by a #error case).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Lucida Console";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">p.s. I am out from this evening (3h30 and counting…) and will be back in the office on 23 February. (Sabbatical, yay! No snow in the Alps, boo!).
 Andrey Churbanov has commit rights, as does Hal. I trust them in my absence. <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">-- Jim<br>
<br>
James Cownie <james.h.cownie@intel.com><br>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Tel: +44 117 9071438</span><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> C Bergström [mailto:cbergstrom@pathscale.com]
<br>
<b>Sent:</b> Monday, December 22, 2014 7:39 PM<br>
<b>To:</b> Peyton, Jonathan L<br>
<b>Cc:</b> openmp-dev@dcs-maillist2.engr.illinois.edu; Cownie, James H; Bliss, Brian E<br>
<b>Subject:</b> Re: [Openmp-dev] AArch64 support<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">ping - it would be great if my patch could get reviewed/pushed. I realize it's the holidays, but I'm trying to use this time to get a buildbot setup and using upstream.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
</div>
</div>
<p>---------------------------------------------------------------------<br>
Intel Corporation (UK) Limited<br>
Registered No. 1134945 (England)<br>
Registered Office: Pipers Way, Swindon SN3 1RJ<br>
VAT No: 860 2173 47</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p></body>
</html>