<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang/include, branch main</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][OpenMP] Canonicalize loops with intervening OpenMP constructs (#169191)</title>
<updated>2025-11-22T22:51:00+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-22T22:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c81a189c5083b72c128ec33cda8d39367c2e2f1f'/>
<id>c81a189c5083b72c128ec33cda8d39367c2e2f1f</id>
<content type='text'>
Example based on the gfortran test a.6.1.f90
```
  do 100 i = 1,10
  !$omp do
    do 100 j = 1,10
      call work(i,j)
    100 continue
```

During canonicalization of label-DO loops, if the body of an OpenMP
construct ends with a label, treat the label as ending the construct
itself.

This will also allow handling of cases like
```
  do 100 i = 1, 10
  !$omp atomic write
  100 x = i
```
which we were unable to before.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Example based on the gfortran test a.6.1.f90
```
  do 100 i = 1,10
  !$omp do
    do 100 j = 1,10
      call work(i,j)
    100 continue
```

During canonicalization of label-DO loops, if the body of an OpenMP
construct ends with a label, treat the label as ending the construct
itself.

This will also allow handling of cases like
```
  do 100 i = 1, 10
  !$omp atomic write
  100 x = i
```
which we were unable to before.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Move some utilities from openmp-parsers to openmp-uti… (#169188)</title>
<updated>2025-11-22T21:26:17+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-22T21:26:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ebb0c9c559b5809be491aa71cbe8235611081194'/>
<id>ebb0c9c559b5809be491aa71cbe8235611081194</id>
<content type='text'>
…ls, NFC</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
…ls, NFC</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][OpenMP] Implement loop nest parser (#168884)</title>
<updated>2025-11-22T18:28:58+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-11-22T18:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c2d659b9b8efac9f80b8ebcb2b38b61295d82bdc'/>
<id>c2d659b9b8efac9f80b8ebcb2b38b61295d82bdc</id>
<content type='text'>
Previously, loop constructs were parsed in a piece-wise manner: the
begin directive, the body, and the end directive were parsed separately.
Later on in canonicalization they were all coalesced into a loop
construct. To facilitate that end-loop directives were given a special
treatment, namely they were parsed as OpenMP constructs. As a result
syntax errors caused by misplaced end-loop directives were handled
differently from those cause by misplaced non-loop end directives.

The new loop nest parser constructs the complete loop construct,
removing the need for the canonicalization step. Additionally, it is the
basis for parsing loop-sequence-associated constructs in the future.

It also removes the need for the special treatment of end-loop
directives. While this patch temporarily degrades the error messaging
for misplaced end-loop directives, it enables uniform handling of any
misplaced end-directives in the future.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, loop constructs were parsed in a piece-wise manner: the
begin directive, the body, and the end directive were parsed separately.
Later on in canonicalization they were all coalesced into a loop
construct. To facilitate that end-loop directives were given a special
treatment, namely they were parsed as OpenMP constructs. As a result
syntax errors caused by misplaced end-loop directives were handled
differently from those cause by misplaced non-loop end directives.

The new loop nest parser constructs the complete loop construct,
removing the need for the canonicalization step. Additionally, it is the
basis for parsing loop-sequence-associated constructs in the future.

It also removes the need for the special treatment of end-loop
directives. While this patch temporarily degrades the error messaging
for misplaced end-loop directives, it enables uniform handling of any
misplaced end-directives in the future.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang] Add -ffast-real-mod back for further control of MOD optimizations (#167118)</title>
<updated>2025-11-22T11:55:32+00:00</updated>
<author>
<name>Michael Klemm</name>
<email>michael.klemm@amd.com</email>
</author>
<published>2025-11-22T11:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9daf4345ec836d50740805c878bd570dd4093354'/>
<id>9daf4345ec836d50740805c878bd570dd4093354</id>
<content type='text'>
It turns out that having `-ffast-math` as the only option to control
optimizations for MOD for REAL kinds (PR #160660) is too coarse-grained
for some applications. Thus, this PR adds back `-ffast-real-mod` to have
more control over the optimization. The `-ffast-math` flag will still
enable the optimization, and `-fno-fast-real-mod` allows one to disable
it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It turns out that having `-ffast-math` as the only option to control
optimizations for MOD for REAL kinds (PR #160660) is too coarse-grained
for some applications. Thus, this PR adds back `-ffast-real-mod` to have
more control over the optimization. The `-ffast-math` flag will still
enable the optimization, and `-fno-fast-real-mod` allows one to disable
it.</pre>
</div>
</content>
</entry>
<entry>
<title>[acc][flang] Implement acc interface for tracking type descriptors (#168982)</title>
<updated>2025-11-21T15:40:04+00:00</updated>
<author>
<name>Razvan Lupusoru</name>
<email>razvan.lupusoru@gmail.com</email>
</author>
<published>2025-11-21T15:40:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=89bb99dd0ed9c7e5dbbc80c6cfb369768bfee96b'/>
<id>89bb99dd0ed9c7e5dbbc80c6cfb369768bfee96b</id>
<content type='text'>
FIR operations that use derived types need to have type descriptor
globals available on device when offloading. Examples of this can be
seen in `CUFDeviceGlobal` which ensures that such type descriptor uses
work on device for CUF.

Similarly, this is needed for OpenACC. This change introduces a new
interface to the OpenACC dialect named
`IndirectGlobalAccessOpInterface` which can be attached to operations
that may result in generation of accesses that use type descriptor
globals. This functionality is needed for the `ACCImplicitDeclare` pass
that is coming in a follow-up change which implicitly ensures that all
referenced globals are available in OpenACC compute contexts.

The interface provides a `getReferencedSymbols` method that collects all
global symbols referenced by an operation. When a symbol table is
provided, the implementation for FIR recursively walks type descriptor
globals to find all transitively referenced symbols.

Note that alternately this could have been implemented in different
ways:
- Codegen could implicitly generate such type globals as needed by
changing the technique that relies on populating them during lowering
(eg generate them directly in gpu.module during codegen).
- This interface could attach to types instead of operations for a
potentially more conservative implementation which maps all type
descriptors even if the underlying implementation using it won't
necessarily need such mapping.

The technique chosen here is consistent with `CUFDeviceGlobal` (which
walks operations inside `prepareImplicitDeviceGlobals`) and avoids
conservative mapping of all type descriptors.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FIR operations that use derived types need to have type descriptor
globals available on device when offloading. Examples of this can be
seen in `CUFDeviceGlobal` which ensures that such type descriptor uses
work on device for CUF.

Similarly, this is needed for OpenACC. This change introduces a new
interface to the OpenACC dialect named
`IndirectGlobalAccessOpInterface` which can be attached to operations
that may result in generation of accesses that use type descriptor
globals. This functionality is needed for the `ACCImplicitDeclare` pass
that is coming in a follow-up change which implicitly ensures that all
referenced globals are available in OpenACC compute contexts.

The interface provides a `getReferencedSymbols` method that collects all
global symbols referenced by an operation. When a symbol table is
provided, the implementation for FIR recursively walks type descriptor
globals to find all transitively referenced symbols.

Note that alternately this could have been implemented in different
ways:
- Codegen could implicitly generate such type globals as needed by
changing the technique that relies on populating them during lowering
(eg generate them directly in gpu.module during codegen).
- This interface could attach to types instead of operations for a
potentially more conservative implementation which maps all type
descriptors even if the underlying implementation using it won't
necessarily need such mapping.

The technique chosen here is consistent with `CUFDeviceGlobal` (which
walks operations inside `prepareImplicitDeviceGlobals`) and avoids
conservative mapping of all type descriptors.</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang][OpenMP] Add semantic support for Loop Sequences and OpenMP loop fuse (#161213)</title>
<updated>2025-11-21T14:16:30+00:00</updated>
<author>
<name>Ferran Toda</name>
<email>f.toda.c@gmail.com</email>
</author>
<published>2025-11-21T14:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f4ebee0ca980f807de32841288b3785dadbc471d'/>
<id>f4ebee0ca980f807de32841288b3785dadbc471d</id>
<content type='text'>
This patch adds semantics for the `omp fuse` directive in flang, as
specified in OpenMP 6.0. This patch also enables semantic support for
loop sequences which are needed for the fuse directive along with
semantics for the `looprange` clause. These changes are only semantic.
Relevant tests have been added , and previous behavior is retained with
no changes.

---------

Co-authored-by: Ferran Toda &lt;ferran.todacasaban@bsc.es&gt;
Co-authored-by: Krzysztof Parzyszek &lt;Krzysztof.Parzyszek@amd.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds semantics for the `omp fuse` directive in flang, as
specified in OpenMP 6.0. This patch also enables semantic support for
loop sequences which are needed for the fuse directive along with
semantics for the `looprange` clause. These changes are only semantic.
Relevant tests have been added , and previous behavior is retained with
no changes.

---------

Co-authored-by: Ferran Toda &lt;ferran.todacasaban@bsc.es&gt;
Co-authored-by: Krzysztof Parzyszek &lt;Krzysztof.Parzyszek@amd.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][cuda] Extract element count computation into helper function (#168937)</title>
<updated>2025-11-20T21:01:22+00:00</updated>
<author>
<name>Zhen Wang</name>
<email>37195552+wangzpgi@users.noreply.github.com</email>
</author>
<published>2025-11-20T21:01:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b8a4aa6a5cd92f06ef9c1d6705b3426107bc655'/>
<id>1b8a4aa6a5cd92f06ef9c1d6705b3426107bc655</id>
<content type='text'>
This patch extracts the common logic for computing array element counts
from shape operands into a reusable helper function in CUFCommon.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch extracts the common logic for computing array element counts
from shape operands into a reusable helper function in CUFCommon.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][debug] Make common blocks data extraction more robust. (#168752)</title>
<updated>2025-11-20T14:28:56+00:00</updated>
<author>
<name>Abid Qadeer</name>
<email>haqadeer@amd.com</email>
</author>
<published>2025-11-20T14:28:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0e8222b84b60c022b2cee308f79a185a943ff514'/>
<id>0e8222b84b60c022b2cee308f79a185a943ff514</id>
<content type='text'>
Our current implementation for extracting information about common block
required traversal of FIR which was not ideal but previously there was
no other way to obtain that information. The `[hl]fir.declare` was
extended in commit https://github.com/llvm/llvm-project/pull/155325 to
include storage and storage_offset. This commit adds these operands in
`fircg.ext_declare` and then use them in `AddDebugInfoPass` to create
debug data for common blocks.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Our current implementation for extracting information about common block
required traversal of FIR which was not ideal but previously there was
no other way to obtain that information. The `[hl]fir.declare` was
extended in commit https://github.com/llvm/llvm-project/pull/155325 to
include storage and storage_offset. This commit adds these operands in
`fircg.ext_declare` and then use them in `AddDebugInfoPass` to create
debug data for common blocks.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Tokenize all -D macro bodies, and do it better (#168116)</title>
<updated>2025-11-19T16:53:59+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-11-19T16:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d988991f9f6b50941ecbffc316890342147a9f75'/>
<id>d988991f9f6b50941ecbffc316890342147a9f75</id>
<content type='text'>
The compiler presently tokenizes the bodies of only function-like macro
definitions from the command line, and does so crudely. Tokenize
keyword-like macros too, get character literals right, and handle
numeric constants correctly. (Also delete two needless functions noticed
in characters.h.)

Fixes https://github.com/llvm/llvm-project/issues/168077.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compiler presently tokenizes the bodies of only function-like macro
definitions from the command line, and does so crudely. Tokenize
keyword-like macros too, get character literals right, and handle
numeric constants correctly. (Also delete two needless functions noticed
in characters.h.)

Fixes https://github.com/llvm/llvm-project/issues/168077.</pre>
</div>
</content>
</entry>
<entry>
<title>[mlir][acc][flang] Introduce OpenACC interfaces for globals (#168614)</title>
<updated>2025-11-19T00:04:11+00:00</updated>
<author>
<name>Razvan Lupusoru</name>
<email>razvan.lupusoru@gmail.com</email>
</author>
<published>2025-11-19T00:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0a96b240fcb715c082ab9b4cab6fddae02065602'/>
<id>0a96b240fcb715c082ab9b4cab6fddae02065602</id>
<content type='text'>
Introduce two new OpenACC operation interfaces for identifying global
variables and their address computations:

- `GlobalVariableOpInterface`: Identifies operations that define global
variables. Provides an `isConstant()` method to query whether the global
is constant.

- `AddressOfGlobalOpInterface`: Identifies operations that compute the
address of a global variable. Provides a `getSymbol()` method to
retrieve the symbol reference.

This is being done in preparation for `ACCImplicitDeclare` pass which
will automatically ensure that `acc declare` is applied to globals when
needed.

The following operations now implement these interfaces:
- `memref::GlobalOp` implements `GlobalVariableOpInterface`
- `memref::GetGlobalOp` implements `AddressOfGlobalOpInterface`
- `fir::GlobalOp` implements `GlobalVariableOpInterface`
- `fir::AddrOfOp` implements `AddressOfGlobalOpInterface`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce two new OpenACC operation interfaces for identifying global
variables and their address computations:

- `GlobalVariableOpInterface`: Identifies operations that define global
variables. Provides an `isConstant()` method to query whether the global
is constant.

- `AddressOfGlobalOpInterface`: Identifies operations that compute the
address of a global variable. Provides a `getSymbol()` method to
retrieve the symbol reference.

This is being done in preparation for `ACCImplicitDeclare` pass which
will automatically ensure that `acc declare` is applied to globals when
needed.

The following operations now implement these interfaces:
- `memref::GlobalOp` implements `GlobalVariableOpInterface`
- `memref::GetGlobalOp` implements `AddressOfGlobalOpInterface`
- `fir::GlobalOp` implements `GlobalVariableOpInterface`
- `fir::AddrOfOp` implements `AddressOfGlobalOpInterface`</pre>
</div>
</content>
</entry>
</feed>
