<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/CodeGen/CGOpenMPRuntime.cpp, branch users/nico/python-1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[CodeGen] Use range-based for loops (NFC) (#145142)</title>
<updated>2025-06-21T15:20:57+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-06-21T15:20:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ae372bfca890cc7a67553b3cb19134359b66c0e1'/>
<id>ae372bfca890cc7a67553b3cb19134359b66c0e1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (#134709)</title>
<updated>2025-06-11T08:31:31+00:00</updated>
<author>
<name>CHANDRA GHALE</name>
<email>chandra.nitdgp@gmail.com</email>
</author>
<published>2025-06-11T08:31:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=afbcf9529a1edb88d067e6fca8d9534901310d5e'/>
<id>afbcf9529a1edb88d067e6fca8d9534901310d5e</id>
<content type='text'>
Codegen support for reduction over private variable with reduction
clause. Section 7.6.10 in in OpenMP 6.0 spec.
- An internal shared copy is initialized with an initializer value.
- The shared copy is updated by combining its value with the values from
the private copies created by the clause.
- Once an encountering thread verifies that all updates are complete,
its original list item is updated by merging its value with that of the
shared copy and then broadcast to all threads.

Sample Test Case from OpenMP 6.0 Example 
```
#include &lt;assert.h&gt;
#include &lt;omp.h&gt;
#define N 10

void do_red(int n, int *v, int &amp;sum_v)
{
    sum_v = 0; // sum_v is private
    #pragma omp for reduction(original(private),+: sum_v)
    for (int i = 0; i &lt; n; i++) 
    {
        sum_v += v[i];
    }
}

int main(void)
{
    int v[N];
    for (int i = 0; i &lt; N; i++)
        v[i] = i;
    #pragma omp parallel num_threads(4)
    {
        int s_v; // s_v is private
        do_red(N, v, s_v);
        assert(s_v == 45);
    }
    return 0;
}
```
Expected Codegen:
```
 // A shared global/static variable is introduced for the reduction result.
 // This variable is initialized (e.g., using memset or a UDR initializer)
 // e.g., .omp.reduction.internal_private_var

 // Barrier before any thread performs combination
  call void @__kmpc_barrier(...)

 // Initialization block (executed by thread 0)
 // e.g., call void @llvm.memset.p0.i64(...) or call @udr_initializer(...)

  call void @__kmpc_critical(...)
    // Inside critical section:
    // Load the current value from the shared variable
    // Load the thread-local private variable's value
    // Perform the reduction operation 
    // Store the result back to the shared variable

  call void @__kmpc_end_critical(...)
  // Barrier after all threads complete their combinations

  call void @__kmpc_barrier(...)
 // Broadcast phase:
 // Load the final result from the shared variable)
 // Store the final result to the original private variable in each thread
 // Final barrier after broadcast

  call void @__kmpc_barrier(...)
```

---------

Co-authored-by: Chandra Ghale &lt;ghale@pe31.hpc.amslabs.hpecorp.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Codegen support for reduction over private variable with reduction
clause. Section 7.6.10 in in OpenMP 6.0 spec.
- An internal shared copy is initialized with an initializer value.
- The shared copy is updated by combining its value with the values from
the private copies created by the clause.
- Once an encountering thread verifies that all updates are complete,
its original list item is updated by merging its value with that of the
shared copy and then broadcast to all threads.

Sample Test Case from OpenMP 6.0 Example 
```
#include &lt;assert.h&gt;
#include &lt;omp.h&gt;
#define N 10

void do_red(int n, int *v, int &amp;sum_v)
{
    sum_v = 0; // sum_v is private
    #pragma omp for reduction(original(private),+: sum_v)
    for (int i = 0; i &lt; n; i++) 
    {
        sum_v += v[i];
    }
}

int main(void)
{
    int v[N];
    for (int i = 0; i &lt; N; i++)
        v[i] = i;
    #pragma omp parallel num_threads(4)
    {
        int s_v; // s_v is private
        do_red(N, v, s_v);
        assert(s_v == 45);
    }
    return 0;
}
```
Expected Codegen:
```
 // A shared global/static variable is introduced for the reduction result.
 // This variable is initialized (e.g., using memset or a UDR initializer)
 // e.g., .omp.reduction.internal_private_var

 // Barrier before any thread performs combination
  call void @__kmpc_barrier(...)

 // Initialization block (executed by thread 0)
 // e.g., call void @llvm.memset.p0.i64(...) or call @udr_initializer(...)

  call void @__kmpc_critical(...)
    // Inside critical section:
    // Load the current value from the shared variable
    // Load the thread-local private variable's value
    // Perform the reduction operation 
    // Store the result back to the shared variable

  call void @__kmpc_end_critical(...)
  // Barrier after all threads complete their combinations

  call void @__kmpc_barrier(...)
 // Broadcast phase:
 // Load the final result from the shared variable)
 // Store the final result to the original private variable in each thread
 // Final barrier after broadcast

  call void @__kmpc_barrier(...)
```

---------

Co-authored-by: Chandra Ghale &lt;ghale@pe31.hpc.amslabs.hpecorp.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Remap paths in OpenMP runtime calls (#82541) (#141250)</title>
<updated>2025-06-05T12:24:57+00:00</updated>
<author>
<name>Dan McGregor</name>
<email>dan.mcgregor@usask.ca</email>
</author>
<published>2025-06-05T12:24:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b5e84ca7407138ec475409a2fad944045178b18a'/>
<id>b5e84ca7407138ec475409a2fad944045178b18a</id>
<content type='text'>
Apply the debug prefix mapping to the OpenMP location strings.

Fixes https://github.com/llvm/llvm-project/issues/82541</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apply the debug prefix mapping to the OpenMP location strings.

Fixes https://github.com/llvm/llvm-project/issues/82541</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use *Map::try_emplace (NFC) (#140477)</title>
<updated>2025-05-19T13:19:53+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-19T13:19:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=325281631a3b5c089dd732d9ca10704431447859'/>
<id>325281631a3b5c089dd732d9ca10704431447859</id>
<content type='text'>
We can simplify the code with *Map::try_emplace where we need
default-constructed values while avoding calling constructors when
keys are already present.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can simplify the code with *Map::try_emplace where we need
default-constructed values while avoding calling constructors when
keys are already present.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use llvm::max_element (NFC) (#140435)</title>
<updated>2025-05-18T14:33:35+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-18T14:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4388f38fbd9a0e6e55d5233cefa3e4ac3d8815d9'/>
<id>4388f38fbd9a0e6e55d5233cefa3e4ac3d8815d9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] AST: remove source locations from [Variable/Dependent]SizedArrayType (#135511)</title>
<updated>2025-04-14T13:44:25+00:00</updated>
<author>
<name>Matheus Izvekov</name>
<email>mizvekov@gmail.com</email>
</author>
<published>2025-04-14T13:44:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=10a15024212fe9ac06adad7daad2c1bb510a612c'/>
<id>10a15024212fe9ac06adad7daad2c1bb510a612c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Don't include CGDebugInfo.h in CodeGenFunction.h (NFC) (#134100)</title>
<updated>2025-04-03T06:04:19+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2025-04-03T06:04:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b384d6d6ccc8f4452cd7086061c657ce76b41224'/>
<id>b384d6d6ccc8f4452cd7086061c657ce76b41224</id>
<content type='text'>
This is an expensive header, only include it where needed. Move some
functions out of line to achieve that.

This reduces time to build clang by ~0.5% in terms of instructions
retired.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an expensive header, only include it where needed. Move some
functions out of line to achieve that.

This reduces time to build clang by ~0.5% in terms of instructions
retired.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][flang][Triple][llvm] Add isOffload function to LangOpts and isGPU function to Triple (#126956)</title>
<updated>2025-03-28T14:19:20+00:00</updated>
<author>
<name>Nick Sarnie</name>
<email>nick.sarnie@intel.com</email>
</author>
<published>2025-03-28T14:19:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=48b753027382a5815295d6680c7dd407be936c86'/>
<id>48b753027382a5815295d6680c7dd407be936c86</id>
<content type='text'>
I'm adding support for SPIR-V, so let's consolidate these checks.

---------

Signed-off-by: Sarnie, Nick &lt;nick.sarnie@intel.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm adding support for SPIR-V, so let's consolidate these checks.

---------

Signed-off-by: Sarnie, Nick &lt;nick.sarnie@intel.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Remove leftover unused variable from #128711</title>
<updated>2025-03-03T22:32:03+00:00</updated>
<author>
<name>Mats Jun Larsen</name>
<email>mats@jun.codes</email>
</author>
<published>2025-03-03T22:30:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f98718c9a169d90e676f877c5b6761b22f424b73'/>
<id>f98718c9a169d90e676f877c5b6761b22f424b73</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Replace PointerType::getUnqual(Type) with opaque  pointer version (NFC) (#128711)</title>
<updated>2025-03-03T22:00:32+00:00</updated>
<author>
<name>Mats Jun Larsen</name>
<email>mats@jun.codes</email>
</author>
<published>2025-03-03T22:00:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=94fad113070878c37f00699ca9d74b6216910af5'/>
<id>94fad113070878c37f00699ca9d74b6216910af5</id>
<content type='text'>
pointer version (NFC)

Follow-up to #123569</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pointer version (NFC)

Follow-up to #123569</pre>
</div>
</content>
</entry>
</feed>
