<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr" bgcolor="#FFFFFF" text="#000000">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">First, as a high-level note, you posted a link to a Google doc, and at the end of the Google doc, you have a list of questions that you'd like answered. In the future, please put the questions directly in the email. For
one thing, more people will read your email than will open your Google doc. Second, having the questions in the email should allow a better threading structure to the replies.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span id="docs-internal-guid-383a5534-7fff-9861-7fcb-e593c7227357"></span></p>
<ul style="margin-top:0;margin-bottom:0;">
<li dir="ltr" style="list-style-type: disc; font-size: 14pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre;">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 14pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">Ivdep:
</span><span style="font-size: 11pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">Is
</span><span style="font-size: 11pt; font-style: italic; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">clang loop vectorize(assume_safety)
</span><span style="font-size: 11pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">equivalent to</span><span style="font-size: 11pt; font-style: italic; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">
ivdep</span><span style="font-size: 11pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">? To what extent do the semantics of ivdep need to be modified for Clang to create an equally “</span><span style="font-size: 11pt; font-style: italic; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">useful
pragma</span><span style="font-size: 11pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">”? To what extent would it be helpful to have this pragma in Clang?</span></p>
</li><li dir="ltr" style="list-style-type: disc; font-size: 14pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre;">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 14pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">Nontemporal:</span><span style="font-size: 11pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">What
kind of analysis can we do in LLVM to find where to use nontemporal accesses? Any help would be greatly appreciated.</span></p>
</li><li dir="ltr" style="list-style-type: disc; font-size: 11pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre;">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 14pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">vecremainder/novecremainder:
</span><span style="font-size: 11pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">Should the pragma simply call the vectorizer to attempt to vectorize the remainder loop, or should the vectorizer
use a different method?</span></p>
</li><li dir="ltr" style="list-style-type: disc; font-size: 14pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre;">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 14pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">mask_readwrite/nomask_readwrite:
</span><span style="font-size: 11pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">Is it a good idea to implement a pragma that will generate mask intrinsics in the IR? What other architectures
(except x86) has support for masked read/writes?</span></p>
</li></ul>
<br>
<p dir="ltr" style="line-height:1.38;margin-left:
36pt;margin-top:0pt;margin-bottom:0pt;">
<span style="font-size: 11pt; font-family: Arial; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">Reference:</span><a href="https://llvm.org/devmtg/2015-04/slides/MaskedIntrinsics.pdf" style="text-decoration-line: none;" id="LPlnk2874" class="OWAAutoLink" previewremoved="true" moz-do-not-send="true"><span style="font-size: 11pt; font-family: Arial; color: rgb(17, 85, 204); font-variant-numeric: normal; font-variant-east-asian: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">https://llvm.org/devmtg/2015-04/slides/MaskedIntrinsics.pdf</span></a></p>
<br>
<p dir="ltr" style="line-height:1.38;margin-left:
36pt;margin-top:0pt;margin-bottom:0pt;">
<span style="font-size: 11pt; font-family: Arial; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">LLVM has mask intrinsics for targets with AVX, AVX2, AVX-512.</span></p>
<p dir="ltr" style="line-height:1.38;margin-left:
36pt;margin-top:0pt;margin-bottom:0pt;">
<span style="font-size: 11pt; font-family: Arial; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">From Slides: ”Most of the targets do not support masked instructions, optimization of instructions
with masks is problematic, avoid introducing new masked instructions into LLVM IR”</span></p>
<ul style="margin-top:0;margin-bottom:0;">
<li dir="ltr" style="list-style-type: disc; font-size: 14pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre;">
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;"><span style="font-size: 14pt; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">aligned/unaligned:
</span><span style="font-size: 11pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;">Is it worthwhile to have LLVM specific pragma rather depending on OpenMP?</span></p>
</li></ul>
<br>
<p style="margin-top:0;margin-bottom:0"> -Hal</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="Signature">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hal Finkel<br>
Lead, Compiler Technology and Programming Languages<br>
Leadership Computing Facility<br>
Argonne National Laboratory</div>
</span></font></div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> llvm-dev
<a class="moz-txt-link-rfc2396E" href="mailto:llvm-dev-bounces@lists.llvm.org"><llvm-dev-bounces@lists.llvm.org></a> on behalf of HAPPY Mahto via llvm-dev
<a class="moz-txt-link-rfc2396E" href="mailto:llvm-dev@lists.llvm.org"><llvm-dev@lists.llvm.org></a><br>
<b>Sent:</b> Thursday, August 8, 2019 11:55 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">
llvm-dev@lists.llvm.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:llvm-dev@lists.llvm.org">
<llvm-dev@lists.llvm.org></a><br>
<b>Cc:</b> BHAVYA BAGLA <a class="moz-txt-link-rfc2396E" href="mailto:cs17btech11007@iith.ac.in">
<cs17btech11007@iith.ac.in></a>; MAMIDALA SAI PRAHARSH <a class="moz-txt-link-rfc2396E" href="mailto:es17btech11013@iith.ac.in">
<es17btech11013@iith.ac.in></a>; HAPPY KUMAR <a class="moz-txt-link-rfc2396E" href="mailto:cs17btech11018@iith.ac.in">
<cs17btech11018@iith.ac.in></a>; YASHAS ANDALURI <a class="moz-txt-link-rfc2396E" href="mailto:es17btech11025@iith.ac.in">
<es17btech11025@iith.ac.in></a><br>
<b>Subject:</b> [llvm-dev] [LLVM] (RFC) Addition/Support of new Vectorization Pragmas in LLVM</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div><span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">Hello all,</span></div>
<div><span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap"></span></div>
<div>
<p dir="ltr" id="x_gmail-docs-internal-guid-ab5c3399-7fff-ad6d-77a6-fda8a9ad8e90" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">We are students from Indian Institute
of Technology(IIT), Hyderabad, we would like to propose the addition of the following pragmas in LLVM that aide in (or possibly increase the scope of) vectorization in LLVM (in comparison with other compilers).</span></p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap"></span></p>
<ol id="x_gmail-docs-internal-guid-1210961d-7fff-442e-856b-6600c80a36d8" style="margin-top:0px; margin-bottom:0px">
<li dir="ltr" style="list-style-type:decimal; font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre">
<p dir="ltr" style="line-height:1.38; margin-top:0pt; margin-bottom:0pt"><span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">ivdep</span></p>
</li><li dir="ltr" style="list-style-type:decimal; font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre">
<p dir="ltr" style="line-height:1.38; margin-top:0pt; margin-bottom:0pt"><span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">Nontemporal</span></p>
</li><li dir="ltr" style="list-style-type:decimal; font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre">
<p dir="ltr" style="line-height:1.38; margin-top:0pt; margin-bottom:0pt"><span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">[no]vecremainder</span></p>
</li><li dir="ltr" style="list-style-type:decimal; font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre">
<p dir="ltr" style="line-height:1.38; margin-top:0pt; margin-bottom:0pt"><span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">[no]mask_readwrite</span></p>
</li><li dir="ltr" style="list-style-type:decimal; font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre">
<p dir="ltr" style="line-height:1.38; margin-top:0pt; margin-bottom:0pt"><span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">[un]aligned</span></p>
</li></ol>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">Could you please check the following
Google document for the semantic description of these pragmas: </span></p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<a href="https://docs.google.com/document/d/1YjGnyzWFKJvqbpCsZicCUczzU8HlLHkmG9MssUw-R1A/edit?usp=sharing" style="text-decoration:none" id="LPlnk333801" class="OWAAutoLink" previewremoved="true" moz-do-not-send="true"><span style="font-size:11pt; font-family:Arial; color:rgb(17,85,204); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:underline; vertical-align:baseline; white-space:pre-wrap">https://docs.google.com/document/d/1YjGnyzWFKJvqbpCsZicCUczzU8HlLHkmG9MssUw-R1A/edit?usp=sharing</span></a></p>
<div id="LPBorder_GT_15652855648010.5487166625028437" style="margin-bottom: 20px; overflow: auto; width: 100%;
text-indent: 0px;">
<table id="LPContainer_15652855647870.6039906081120645" role="presentation" style="width: 90%;
background-color: rgb(255, 255, 255); position:
relative; overflow: auto; padding-top: 20px;
padding-bottom: 20px; margin-top: 20px; border-top:
1px dotted rgb(200, 200, 200); border-bottom: 1px
dotted rgb(200, 200, 200);" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td id="ImageCell_15652855647910.6809876809871069" colspan="1" style="width: 250px; position:
relative; display: table-cell; padding-right:
20px;">
<div id="LPImageContainer_15652855647910.4010814812050496" style="background-color: rgb(255, 255, 255);
height: 131px; position: relative; margin:
auto; display: table; width: 251px;">
<a id="LPImageAnchor_15652855647920.8326888223292568" href="https://docs.google.com/document/d/1YjGnyzWFKJvqbpCsZicCUczzU8HlLHkmG9MssUw-R1A/edit?usp=sharing" target="_blank" style="display: table-cell;
text-align: center;" moz-do-not-send="true"><img id="LPThumbnailImageID_15652855647930.8542209161246299" style="display:
inline-block; max-width: 250px;
max-height: 250px; height: 131px; width:
250px; border-width: 0px; vertical-align:
bottom;" src="https://lh4.googleusercontent.com/BFUxChQk941g1yFLPCtFJ6l0ADX-mYOx9H4rwnKhKhax-5qlknMQuqS5g1glN-44f0Ls3w=w1200-h630-p" moz-do-not-send="true" height="131" width="250"></a></div>
</td>
<td id="TextCell_15652855647940.6259626968425227" colspan="2" style="vertical-align: top;
position: relative; padding: 0px; display:
table-cell;">
<div id="LPTitle_15652855647940.417183158898472" style="top: 0px; color: rgb(0, 120, 215);
font-weight: 400; font-size: 21px;
font-family: wf_segoe-ui_light, "Segoe UI
Light", "Segoe WP Light",
"Segoe UI", "Segoe WP",
Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15652855647960.6941387553105847" href="https://docs.google.com/document/d/1YjGnyzWFKJvqbpCsZicCUczzU8HlLHkmG9MssUw-R1A/edit?usp=sharing" target="_blank" style="text-decoration:
none;" moz-do-not-send="true">Vectorization
Pragmas LLVM:RFC: V2</a></div>
<div id="LPMetadata_15652855647970.864892127964479" style="margin: 10px 0px 16px; color: rgb(102,
102, 102); font-weight: 400; font-family:
wf_segoe-ui_normal, "Segoe UI",
"Segoe WP", Tahoma, Arial,
sans-serif; font-size: 14px; line-height:
14px;">
docs.google.com</div>
<div id="LPDescription_15652855647990.6759826847547004" style="display: block; color: rgb(102, 102,
102); font-weight: 400; font-family:
wf_segoe-ui_normal, "Segoe UI",
"Segoe WP", Tahoma, Arial,
sans-serif; font-size: 14px; line-height:
20px; max-height: 100px; overflow: hidden;">
Vectorization Pragmas in LLVM: An RFC Yashas Andaluri, Happy Mahto, M Sai Praharsh, Bhavya Bagla IIT Hyderabad Aug 8th, 2019 [Thanks to feedback from Venugopal Raghavan, Shivarama Rao (AMD) and Michael Kruse & Hal Finkel (ANL).] Vectorization Pragmas ivdep
vector(nontemporal) vector([no]vecrema...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">It would be great if you could please
review the above document and suggest us on how to proceed further (either about the semantics, or, about the code sections in LLVM).</span></p>
<br>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">Thank you</span></p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">Yashas, Happy, Sai Praharsh, and Bhavya</span></p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap">B.Tech 3rd year, IITH.</span></p>
<p dir="ltr" style="line-height:1.38; margin-top:0pt;
margin-bottom:0pt">
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap"></span></p>
<span style="font-size:11pt; font-family:Arial; color:rgb(0,0,0); background-color:transparent; font-weight:400; font-style:normal; font-variant:normal; text-decoration:none; vertical-align:baseline; white-space:pre-wrap"></span></div>
</div>
</div>
</div>
</div>
</body>
</html>