<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang/lib/Semantics/semantics.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][OpenMP] Sema checks, lowering with new format of MAP modifiers (#149137)</title>
<updated>2025-07-22T12:37:47+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2025-07-22T12:37:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2914a488c7f49c4817bbfb86f74da04fd338b4eb'/>
<id>2914a488c7f49c4817bbfb86f74da04fd338b4eb</id>
<content type='text'>
OpenMP 6.0 has changed the modifiers on the MAP clause. Previous patch
has introduced parsing support for them. This patch introduces
processing of the new forms in semantic checks and in lowering. This
only applies to existing modifiers, which were updated in the 6.0 spec.
Any of the newly introduced modifiers (SELF and REF) are ignored.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OpenMP 6.0 has changed the modifiers on the MAP clause. Previous patch
has introduced parsing support for them. This patch introduces
processing of the new forms in semantic checks and in lowering. This
only applies to existing modifiers, which were updated in the 6.0 spec.
Any of the newly introduced modifiers (SELF and REF) are ignored.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][driver] -Werror promotes warnings to error and interopts with -Wfatal-errors (#148748)</title>
<updated>2025-07-16T19:26:38+00:00</updated>
<author>
<name>Andre Kuhlenschmidt</name>
<email>andre.kuhlenschmidt@gmail.com</email>
</author>
<published>2025-07-16T19:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b3c72a97c5ac352b89c12f3cf7c3f223219f91ed'/>
<id>b3c72a97c5ac352b89c12f3cf7c3f223219f91ed</id>
<content type='text'>
This PR changes how `-Werror` promotes warnings to errors so that it
interoperates with `-Wfatal-error`. It maintains the property that
warnings and other messages promoted to errors are displayed as there
original message.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR changes how `-Werror` promotes warnings to errors so that it
interoperates with `-Wfatal-error`. It maintains the property that
warnings and other messages promoted to errors are displayed as there
original message.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][driver] add -Wfatal-errors (#147614)</title>
<updated>2025-07-09T19:35:43+00:00</updated>
<author>
<name>Andre Kuhlenschmidt</name>
<email>andre.kuhlenschmidt@gmail.com</email>
</author>
<published>2025-07-09T19:35:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fc9dd587347ee2708ac1eff2716d3edd6b08a873'/>
<id>fc9dd587347ee2708ac1eff2716d3edd6b08a873</id>
<content type='text'>
Adds the flag `-Wfatal-errors` which truncates the error messages at 1 error.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the flag `-Wfatal-errors` which truncates the error messages at 1 error.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][CLI] Have the CLI hint the flag to disable a warning (#144767)</title>
<updated>2025-06-30T17:17:05+00:00</updated>
<author>
<name>Andre Kuhlenschmidt</name>
<email>andre.kuhlenschmidt@gmail.com</email>
</author>
<published>2025-06-30T17:17:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=83b462af17ca807d276963b37640a9f2e91d70b1'/>
<id>83b462af17ca807d276963b37640a9f2e91d70b1</id>
<content type='text'>
Adds a hint to the warning message to disable a warning and updates the
tests to expect this.

Also fixes a bug in the storage of canonical spelling of error flags so
that they are not used after free.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a hint to the warning message to disable a warning and updates the
tests to expect this.

Also fixes a bug in the storage of canonical spelling of error flags so
that they are not used after free.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] fix scoping of cray pointer declarations and add check for initialization (#136776)</title>
<updated>2025-05-02T14:35:24+00:00</updated>
<author>
<name>Andre Kuhlenschmidt</name>
<email>andre.kuhlenschmidt@gmail.com</email>
</author>
<published>2025-05-02T14:35:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a18adb2358cac0f14cce5faf27f607c2b1601ed9'/>
<id>a18adb2358cac0f14cce5faf27f607c2b1601ed9</id>
<content type='text'>
This PR:
- makes Cray pointer declarations shadow previous bindings instead of
modifying them,
- errors when the pointee of a cray pointee has the SAVE attribute, and
- adds a missing newline after dumping the list of cray pointers in a
scope.

Closes #135579</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR:
- makes Cray pointer declarations shadow previous bindings instead of
modifying them,
- errors when the pointee of a cray pointee has the SAVE attribute, and
- adds a missing newline after dumping the list of cray pointers in a
scope.

Closes #135579</pre>
</div>
</content>
</entry>
<entry>
<title>[Flang] Move non-common headers to FortranSupport (#124416)</title>
<updated>2025-02-06T14:29:10+00:00</updated>
<author>
<name>Michael Kruse</name>
<email>llvm-project@meinersbur.de</email>
</author>
<published>2025-02-06T14:29:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b815a3942a0b0a9e7aab6b269ffdb0e93abc4368'/>
<id>b815a3942a0b0a9e7aab6b269ffdb0e93abc4368</id>
<content type='text'>
Move non-common files from FortranCommon to FortranSupport (analogous to
LLVMSupport) such that

* declarations and definitions that are only used by the Flang compiler,
but not by the runtime, are moved to FortranSupport

* declarations and definitions that are used by both ("common"), the
compiler and the runtime, remain in FortranCommon

* generic STL-like/ADT/utility classes and algorithms remain in
FortranCommon

This allows a for cleaner separation between compiler and runtime
components, which are compiled differently. For instance, runtime
sources must not use STL's `&lt;optional&gt;` which causes problems with CUDA
support. Instead, the surrogate header `flang/Common/optional.h` must be
used. This PR fixes this for `fast-int-sel.h`.

Declarations in include/Runtime are also used by both, but are
header-only. `ISO_Fortran_binding_wrapper.h`, a header used by compiler
and runtime, is also moved into FortranCommon.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move non-common files from FortranCommon to FortranSupport (analogous to
LLVMSupport) such that

* declarations and definitions that are only used by the Flang compiler,
but not by the runtime, are moved to FortranSupport

* declarations and definitions that are used by both ("common"), the
compiler and the runtime, remain in FortranCommon

* generic STL-like/ADT/utility classes and algorithms remain in
FortranCommon

This allows a for cleaner separation between compiler and runtime
components, which are compiled differently. For instance, runtime
sources must not use STL's `&lt;optional&gt;` which causes problems with CUDA
support. Instead, the surrogate header `flang/Common/optional.h` must be
used. This PR fixes this for `fast-int-sel.h`.

Declarations in include/Runtime are also used by both, but are
header-only. `ISO_Fortran_binding_wrapper.h`, a header used by compiler
and runtime, is also moved into FortranCommon.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Fix references to destroyed objects (#111582)</title>
<updated>2024-10-10T17:25:19+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2024-10-10T17:25:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4f2b65fb80a4b27e5fb88db816ed0ce174c9b1b4'/>
<id>4f2b65fb80a4b27e5fb88db816ed0ce174c9b1b4</id>
<content type='text'>
ProgramTree instances are created as the value of a local variable in
the Pre(const parser::ProgramUnit &amp;) member function in name resolution.
But references to these ProgramTree instances can persist in
SubprogramNameDetails symbol table entries that might survive that
function call's lifetime, and lead to trouble later when (e.g.)
expression semantics needs to deal with a possible forward reference in
a function reference in an expression being processed later in
expression checking.

So put those ProgramTree instances into a longer-lived linked list
within the SemanticsContext.

Might fix some weird crashes reported on big-endian targets (AIX &amp;
Solaris).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ProgramTree instances are created as the value of a local variable in
the Pre(const parser::ProgramUnit &amp;) member function in name resolution.
But references to these ProgramTree instances can persist in
SubprogramNameDetails symbol table entries that might survive that
function call's lifetime, and lead to trouble later when (e.g.)
expression semantics needs to deal with a possible forward reference in
a function reference in an expression being processed later in
expression checking.

So put those ProgramTree instances into a longer-lived linked list
within the SemanticsContext.

Might fix some weird crashes reported on big-endian targets (AIX &amp;
Solaris).</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][semantics][OpenMP] no privatisation of stmt functions (#106550)</title>
<updated>2024-10-04T09:46:31+00:00</updated>
<author>
<name>Tom Eccles</name>
<email>tom.eccles@arm.com</email>
</author>
<published>2024-10-04T09:46:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c734d77b9913052012faf91fdc19753f791421d9'/>
<id>c734d77b9913052012faf91fdc19753f791421d9</id>
<content type='text'>
OpenMP prohibits privatisation of variables that appear in expressions
for statement functions.

This is a re-working of an old patch https://reviews.llvm.org/D93213 by
@praveen-g-ctt.

The old patch couldn't be landed because of ordering concerns. Statement
functions are rewritten during parse tree rewriting, but this was done
after resolve-directives and so some array expressions were incorrectly
identified as statement functions. For this reason **I have opted to
re-order the semantics driver so that resolve-directives is run after
parse tree rewriting**.

Closes #54677

---------

Co-authored-by: Praveen &lt;praveen@compilertree.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OpenMP prohibits privatisation of variables that appear in expressions
for statement functions.

This is a re-working of an old patch https://reviews.llvm.org/D93213 by
@praveen-g-ctt.

The old patch couldn't be landed because of ordering concerns. Statement
functions are rewritten during parse tree rewriting, but this was done
after resolve-directives and so some array expressions were incorrectly
identified as statement functions. For this reason **I have opted to
re-order the semantics driver so that resolve-directives is run after
parse tree rewriting**.

Closes #54677

---------

Co-authored-by: Praveen &lt;praveen@compilertree.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Tag warnings with LanguageFeature or UsageWarning (#110304)</title>
<updated>2024-10-02T15:54:49+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2024-10-02T15:54:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0f973ac783aa100cfbce1cd2c6e8a3a8f648fae7'/>
<id>0f973ac783aa100cfbce1cd2c6e8a3a8f648fae7</id>
<content type='text'>
(This is a big patch, but it's nearly an NFC. No test results have
changed and all Fortran tests in the LLVM test suites work as expected.)

Allow a parser::Message for a warning to be marked with the
common::LanguageFeature or common::UsageWarning that controls it. This
will allow a later patch to add hooks whereby a driver will be able to
decorate warning messages with the names of its options that enable each
particular warning, and to add hooks whereby a driver can map those
enumerators by name to command-line options that enable/disable the
language feature and enable/disable the messages.

The default settings in the constructor for LanguageFeatureControl were
moved from its header file into its C++ source file.

Hooks for a driver to use to map the name of a feature or warning to its
enumerator were also added.

To simplify the tagging of warnings with their corresponding language
feature or usage warning, to ensure that they are properly controlled by
ShouldWarn(), and to ensure that warnings never issue at code sites in
module files, two new Warn() member function templates were added to
SemanticsContext and other contextual frameworks. Warn() can't be used
before source locations can be mapped to scopes, but the bulk of
existing code blocks testing ShouldWarn() and FindModuleFile() before
calling Say() were convertible into calls to Warn(). The ones that were
not convertible were extended with explicit calls to
Message::set_languageFeature() and set_usageWarning().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(This is a big patch, but it's nearly an NFC. No test results have
changed and all Fortran tests in the LLVM test suites work as expected.)

Allow a parser::Message for a warning to be marked with the
common::LanguageFeature or common::UsageWarning that controls it. This
will allow a later patch to add hooks whereby a driver will be able to
decorate warning messages with the names of its options that enable each
particular warning, and to add hooks whereby a driver can map those
enumerators by name to command-line options that enable/disable the
language feature and enable/disable the messages.

The default settings in the constructor for LanguageFeatureControl were
moved from its header file into its C++ source file.

Hooks for a driver to use to map the name of a feature or warning to its
enumerator were also added.

To simplify the tagging of warnings with their corresponding language
feature or usage warning, to ensure that they are properly controlled by
ShouldWarn(), and to ensure that warnings never issue at code sites in
module files, two new Warn() member function templates were added to
SemanticsContext and other contextual frameworks. Warn() can't be used
before source locations can be mapped to scopes, but the bulk of
existing code blocks testing ShouldWarn() and FindModuleFile() before
calling Say() were convertible into calls to Warn(). The ones that were
not convertible were extended with explicit calls to
Message::set_languageFeature() and set_usageWarning().</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][Semantics] Add LangOptions to SemanticsContext (#110013)</title>
<updated>2024-09-26T13:56:22+00:00</updated>
<author>
<name>Krzysztof Parzyszek</name>
<email>Krzysztof.Parzyszek@amd.com</email>
</author>
<published>2024-09-26T13:56:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3b20a833cb4d701ff9d61aca2120d125b618950f'/>
<id>3b20a833cb4d701ff9d61aca2120d125b618950f</id>
<content type='text'>
The motivation for this is to make OpenMP settings visible in the
semantic checks (OpenMP version in particular).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The motivation for this is to make OpenMP settings visible in the
semantic checks (OpenMP version in particular).</pre>
</div>
</content>
</entry>
</feed>
