<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>What exactly do you want to understand?<br>
</p>
<pre class="moz-signature" cols="72">-------------
Best regards,
Alexey Bataev</pre>
<div class="moz-cite-prefix">26.09.2019 19:06, Hamilton Tobón
Mosquera via cfe-dev пишет:<br>
</div>
<blockquote type="cite"
cite="mid:%3CSN6PR07MB50878580892DE9FE2B1CDB8D80860@SN6PR07MB5087.namprd07.prod.outlook.com%3E">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Hello guys,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
I'm a Clang newcomer. To make my travel through Clang
interesting, I'm trying to solve this bug
<a href="https://bugs.llvm.org/show_bug.cgi?id=40253"
id="LPlnk751598" moz-do-not-send="true">https://bugs.llvm.org/show_bug.cgi?id=40253</a>.
I've spend many many hours debugging Clang using gdb. To fully
understand how "#pragma target" works, I started debbuging this
simple program:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt">
<div style="color: #d4d4d4; background-color: #1e1e1e;
font-family: 'Droid Sans Mono', 'monospace', monospace,
'Droid Sans Fallback'; font-weight: normal; font-size: 14px;
line-height: 19px">
<div><span style="color: #569cd6">int</span><span> </span><span
style="color: #dcdcaa">main</span><span>() {</span></div>
<div><span style="color: #569cd6"> </span><span
style="color: #c586c0">#pragma</span><span style="color:
#569cd6"> </span><span style="color: #9cdcfe">omp</span><span
style="color: #569cd6"> </span><span style="color:
#9cdcfe">parallel</span></div>
<div><span> {</span></div>
<div><span> </span><span style="color: #569cd6">int</span><span> a;</span></div>
<div><span> }</span></div>
<div><span> </span><span style="color: #c586c0">return</span><span> </span><span
style="color: #b5cea8">0</span><span>;</span></div>
<div><span>}</span></div>
</div>
</div>
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
I tracked the compilation up to this function <a
href="https://clang.llvm.org/doxygen/CGOpenMPRuntime_8cpp_source.html#l01716"
id="LPNoLP829357" moz-do-not-send="true">
https://clang.llvm.org/doxygen/CGOpenMPRuntime_8cpp_source.html#l01716</a>.
I'm kind of lost, I don't know if this is the proper way of
learning how OpenMP works in Clang. There's a huge amount of
code and I don't know which functions to understand and which
ones to skip.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Could someone please guide me, or just give me some advice?. If
it helps, I have Clang compiled in Debug mode and with shared
libraries.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Thanks.<br>
</div>
<br>
</blockquote>
</body>
</html>