<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang/lib/Lower/Bridge.cpp, branch users/mingmingl-llvm/samplefdo-profile-format</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>[flang][acc] Fix incorrect loop body nesting and IV value use (#157708)</title>
<updated>2025-09-09T20:09:04+00:00</updated>
<author>
<name>Razvan Lupusoru</name>
<email>razvan.lupusoru@gmail.com</email>
</author>
<published>2025-09-09T20:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2a2296b1aab4614bf6c95c3003000832c9d43de5'/>
<id>2a2296b1aab4614bf6c95c3003000832c9d43de5</id>
<content type='text'>
Two issues are being resolved:
- Incorrect loop body nesting caused by insertion point not being
updated after the loop. The scenario is now being tested through
`nested_do_loops` function in the test.
- Incorrect IV ssa values due to incorrect handling of scoping.

Additionally, this also adds `--openacc-do-loop-to-acc-loop` flag so
that the implicit conversion can be disabled for testing.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Two issues are being resolved:
- Incorrect loop body nesting caused by insertion point not being
updated after the loop. The scenario is now being tested through
`nested_do_loops` function in the test.
- Incorrect IV ssa values due to incorrect handling of scoping.

Additionally, this also adds `--openacc-do-loop-to-acc-loop` flag so
that the implicit conversion can be disabled for testing.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Attach proper storage to [hl]fir.declare in lowering. (#155742)</title>
<updated>2025-09-04T22:49:11+00:00</updated>
<author>
<name>Slava Zakharin</name>
<email>szakharin@nvidia.com</email>
</author>
<published>2025-09-04T22:49:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=83da8d08ff110fd5bf3fff17043420ba442e300c'/>
<id>83da8d08ff110fd5bf3fff17043420ba442e300c</id>
<content type='text'>
As described in
https://discourse.llvm.org/t/rfc-flang-representation-for-objects-inside-physical-storage/88026,
`[hl]fir.declare` should carry information about the layout
of COMMON/EQUIVALENCE variables within the physical storage.

This patch modifes Flang lowering to attach this information.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As described in
https://discourse.llvm.org/t/rfc-flang-representation-for-objects-inside-physical-storage/88026,
`[hl]fir.declare` should carry information about the layout
of COMMON/EQUIVALENCE variables within the physical storage.

This patch modifes Flang lowering to attach this information.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Use SmallPtrSet directly instead of SmallSet (NFC) (#154471)</title>
<updated>2025-08-20T23:30:24+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-08-20T23:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8a5b6b302eb55e514f086ffcee3cf4f81750bb5a'/>
<id>8a5b6b302eb55e514f086ffcee3cf4f81750bb5a</id>
<content type='text'>
I'm trying to remove the redirection in SmallSet.h:

template &lt;typename PointeeType, unsigned N&gt;
class SmallSet&lt;PointeeType*, N&gt; : public SmallPtrSet&lt;PointeeType*, N&gt;
{};

to make it clear that we are using SmallPtrSet.  There are only
handful places that rely on this redirection.

This patch replaces SmallSet to SmallPtrSet where the element type is
a pointer.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm trying to remove the redirection in SmallSet.h:

template &lt;typename PointeeType, unsigned N&gt;
class SmallSet&lt;PointeeType*, N&gt; : public SmallPtrSet&lt;PointeeType*, N&gt;
{};

to make it clear that we are using SmallPtrSet.  There are only
handful places that rely on this redirection.

This patch replaces SmallSet to SmallPtrSet where the element type is
a pointer.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] `do concurrent`: Enable delayed localization by default (#154303)</title>
<updated>2025-08-19T10:07:17+00:00</updated>
<author>
<name>Kareem Ergawy</name>
<email>kareem.ergawy@amd.com</email>
</author>
<published>2025-08-19T10:07:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0e93dbc6b1cac9c69c546cff7b5dd5935917ae9e'/>
<id>0e93dbc6b1cac9c69c546cff7b5dd5935917ae9e</id>
<content type='text'>
Enables delayed localization by default for `do concurrent`. Tested both
gfortran and Fujitsu test suites.

All tests pass for gfortran tests. For Fujitsu, enabled delayed
localization passes more tests:

Delayed localization disabled:
Testing Time: 7251.76s
  Passed            : 88520
  Failed            :   162
  Executable Missing:   408

Delayed localization enabled:
Testing Time: 7216.73s
  Passed            : 88522
  Failed            :   160
  Executable Missing:   408</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enables delayed localization by default for `do concurrent`. Tested both
gfortran and Fujitsu test suites.

All tests pass for gfortran tests. For Fujitsu, enabled delayed
localization passes more tests:

Delayed localization disabled:
Testing Time: 7251.76s
  Passed            : 88520
  Failed            :   162
  Executable Missing:   408

Delayed localization enabled:
Testing Time: 7216.73s
  Passed            : 88522
  Failed            :   160
  Executable Missing:   408</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Adding support of -fcoarray flang and init PRIF (#151675)</title>
<updated>2025-08-15T23:04:49+00:00</updated>
<author>
<name>Jean-Didier PAILLEUX</name>
<email>jean-didier.pailleux@sipearl.com</email>
</author>
<published>2025-08-15T23:04:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=acdbb00af5d0b6469fceb8abb26634de2dbee985'/>
<id>acdbb00af5d0b6469fceb8abb26634de2dbee985</id>
<content type='text'>
In relation to the approval and merge of the
[PRIF](https://github.com/llvm/llvm-project/pull/76088) specification
about multi-image features in Flang, here is a first PR to add support
for the `-fcoarray` compilation flag and the initialization of the PRIF
environment.
Other PRs will follow for adding support of lowering to PRIF.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In relation to the approval and merge of the
[PRIF](https://github.com/llvm/llvm-project/pull/76088) specification
about multi-image features in Flang, here is a first PR to add support
for the `-fcoarray` compilation flag and the initialization of the PRIF
environment.
Other PRs will follow for adding support of lowering to PRIF.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Do not re-localize loop ivs when nested inside `block`s (#153350)</title>
<updated>2025-08-15T06:45:02+00:00</updated>
<author>
<name>Kareem Ergawy</name>
<email>kareem.ergawy@amd.com</email>
</author>
<published>2025-08-15T06:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9e33fd49386a4be569e7d579c24e0e2a9607943'/>
<id>b9e33fd49386a4be569e7d579c24e0e2a9607943</id>
<content type='text'>
Consider the following example:
```fortran
  implicit none
  integer :: i, j

  do concurrent (i=1:10) local(j)
    block
      do j=1,20
      end do
    end block
  end do
```

Without the fix introduced in this PR, the compiler would "re-localize"
the `j` variable inside the `fir.do_concurrent` loop:
```mlir
    fir.do_concurrent {
      %7 = fir.alloca i32 {bindc_name = "j"}
      %8:2 = hlfir.declare %7 {uniq_name = "_QFloop_in_nested_blockEj"} : (!fir.ref&lt;i32&gt;) -&gt; (!fir.ref&lt;i32&gt;, !fir.ref&lt;i32&gt;)
      ...
      fir.do_concurrent.loop (%arg0) = (%5) to (%6) step (%c1) local(@_QFloop_in_nested_blockEj_private_i32 %4#0 -&gt; %arg1 : !fir.ref&lt;i32&gt;) {
        %12:2 = hlfir.declare %arg1 {uniq_name = "_QFloop_in_nested_blockEj"} : (!fir.ref&lt;i32&gt;) -&gt; (!fir.ref&lt;i32&gt;, !fir.ref&lt;i32&gt;)
        ...
        %17:2 = fir.do_loop %arg2 = %14 to %15 step %c1_1 iter_args(%arg3 = %16) -&gt; (index, i32) {
          fir.store %arg3 to %8#0 : !fir.ref&lt;i32&gt;
          ...
        }
      }
    }
```

This happened because we did a shallow look-up of `j` and since the loop
is nested inside a `block`, the look-up failed and we re-created a local
allocation for `j` inside the parent `fir.do_concurrent` loop. This
means that we ended up not using the actual localized symbol which is
passed as a region argument to the `fir.do_concurrent.loop` op.

In case of `j`, we do not need to do a shallow look-up. The shallow
look-up is only needed if a symbol is an OpenMP private one or an
iteration variable of a `do concurrent` loop. Neither of which applies
to `j`.

With the fix, `j` is properly resolved to the `local` region argument:
```mlir
    fir.do_concurrent {
      ...
      fir.do_concurrent.loop (%arg0) = (%5) to (%6) step (%c1) local(@_QFloop_in_nested_blockEj_private_i32 %4#0 -&gt; %arg1 : !fir.ref&lt;i32&gt;) {
        ...
        %10:2 = hlfir.declare %arg1 {uniq_name = "_QFloop_in_nested_blockEj"} : (!fir.ref&lt;i32&gt;) -&gt; (!fir.ref&lt;i32&gt;, !fir.ref&lt;i32&gt;)
        ...
        %15:2 = fir.do_loop %arg2 = %12 to %13 step %c1_1 iter_args(%arg3 = %14) -&gt; (index, i32) {
          fir.store %arg3 to %10#0 : !fir.ref&lt;i32&gt;
          ...
        }
      }
    }
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consider the following example:
```fortran
  implicit none
  integer :: i, j

  do concurrent (i=1:10) local(j)
    block
      do j=1,20
      end do
    end block
  end do
```

Without the fix introduced in this PR, the compiler would "re-localize"
the `j` variable inside the `fir.do_concurrent` loop:
```mlir
    fir.do_concurrent {
      %7 = fir.alloca i32 {bindc_name = "j"}
      %8:2 = hlfir.declare %7 {uniq_name = "_QFloop_in_nested_blockEj"} : (!fir.ref&lt;i32&gt;) -&gt; (!fir.ref&lt;i32&gt;, !fir.ref&lt;i32&gt;)
      ...
      fir.do_concurrent.loop (%arg0) = (%5) to (%6) step (%c1) local(@_QFloop_in_nested_blockEj_private_i32 %4#0 -&gt; %arg1 : !fir.ref&lt;i32&gt;) {
        %12:2 = hlfir.declare %arg1 {uniq_name = "_QFloop_in_nested_blockEj"} : (!fir.ref&lt;i32&gt;) -&gt; (!fir.ref&lt;i32&gt;, !fir.ref&lt;i32&gt;)
        ...
        %17:2 = fir.do_loop %arg2 = %14 to %15 step %c1_1 iter_args(%arg3 = %16) -&gt; (index, i32) {
          fir.store %arg3 to %8#0 : !fir.ref&lt;i32&gt;
          ...
        }
      }
    }
```

This happened because we did a shallow look-up of `j` and since the loop
is nested inside a `block`, the look-up failed and we re-created a local
allocation for `j` inside the parent `fir.do_concurrent` loop. This
means that we ended up not using the actual localized symbol which is
passed as a region argument to the `fir.do_concurrent.loop` op.

In case of `j`, we do not need to do a shallow look-up. The shallow
look-up is only needed if a symbol is an OpenMP private one or an
iteration variable of a `do concurrent` loop. Neither of which applies
to `j`.

With the fix, `j` is properly resolved to the `local` region argument:
```mlir
    fir.do_concurrent {
      ...
      fir.do_concurrent.loop (%arg0) = (%5) to (%6) step (%c1) local(@_QFloop_in_nested_blockEj_private_i32 %4#0 -&gt; %arg1 : !fir.ref&lt;i32&gt;) {
        ...
        %10:2 = hlfir.declare %arg1 {uniq_name = "_QFloop_in_nested_blockEj"} : (!fir.ref&lt;i32&gt;) -&gt; (!fir.ref&lt;i32&gt;, !fir.ref&lt;i32&gt;)
        ...
        %15:2 = fir.do_loop %arg2 = %12 to %13 step %c1_1 iter_args(%arg3 = %14) -&gt; (index, i32) {
          fir.store %arg3 to %10#0 : !fir.ref&lt;i32&gt;
          ...
        }
      }
    }
```</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Support data transfer with conversion (#153242)</title>
<updated>2025-08-13T17:55:15+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-08-13T17:55:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a2899c457ecac9f2511fa08926bcf1c22eee1d14'/>
<id>a2899c457ecac9f2511fa08926bcf1c22eee1d14</id>
<content type='text'>
When the rhs of the data transfer is from a different type, allocate a
new temp on the host and first transfer the rhs to it. Then, use the
elemental op created to do the conversion.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the rhs of the data transfer is from a different type, allocate a
new temp on the host and first transfer the rhs to it. Then, use the
elemental op created to do the conversion.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Skip processing reductions for unstructured `do concurrent` loops (#150188)</title>
<updated>2025-08-08T04:22:53+00:00</updated>
<author>
<name>Kareem Ergawy</name>
<email>kareem.ergawy@amd.com</email>
</author>
<published>2025-08-08T04:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d7d0d7a80fc343750bbf85ea8c184737d9c70f62'/>
<id>d7d0d7a80fc343750bbf85ea8c184737d9c70f62</id>
<content type='text'>
Fixes #149563

When emitting unstructured `do concurrent` loops, reduction processing
should be skipped since we are not emitting `fir.do_concurrent` loop in
the first place.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #149563

When emitting unstructured `do concurrent` loops, reduction processing
should be skipped since we are not emitting `fir.do_concurrent` loop in
the first place.</pre>
</div>
</content>
</entry>
<entry>
<title>Reland "[flang][cuda] Set the allocator of derived type component after allocation" (#152418)</title>
<updated>2025-08-07T04:49:55+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-08-07T04:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eb0ddba26b6a265b44b442ae666db43b9f28b26a'/>
<id>eb0ddba26b6a265b44b442ae666db43b9f28b26a</id>
<content type='text'>
Reviewed in #152379
- Move the allocator index set up after the allocate statement otherwise
the derived type descriptor is not allocated.
- Support array of derived-type with device component</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed in #152379
- Move the allocator index set up after the allocate statement otherwise
the derived type descriptor is not allocated.
- Support array of derived-type with device component</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Remove too restrictive assert for data transfer (#152398)</title>
<updated>2025-08-07T01:49:52+00:00</updated>
<author>
<name>Valentin Clement (バレンタイン クレメン)</name>
<email>clementval@gmail.com</email>
</author>
<published>2025-08-07T01:49:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2696e8c1499682f0b1f357d9035ed59f544892f8'/>
<id>2696e8c1499682f0b1f357d9035ed59f544892f8</id>
<content type='text'>
When the rhs is a an array element, the assert was triggered but this is
still a valid transfer. Remove the assert. The operation has a verifier
to check its validity.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the rhs is a an array element, the assert was triggered but this is
still a valid transfer. Remove the assert. The operation has a verifier
to check its validity.</pre>
</div>
</content>
</entry>
</feed>
