#
fb4ecada |
| 20-Nov-2024 |
Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> |
[flang][OpenMP] Change clause modifier representation in parser (#116656)
The main issue to solve is that OpenMP modifiers can be specified in any
order, so the parser cannot expect any specific mo
[flang][OpenMP] Change clause modifier representation in parser (#116656)
The main issue to solve is that OpenMP modifiers can be specified in any
order, so the parser cannot expect any specific modifier at a given
position. To solve that, define modifier to be a union of all allowable
specific modifiers for a given clause.
Additionally, implement modifier descriptors: for each modifier the
corresponding descriptor contains a set of properties of the modifier
that allow a common set of semantic checks. Start with the syntactic
properties defined in the spec: Required, Unique, Exclusive, Ultimate,
and implement common checks to verify each of them.
OpenMP modifier overhaul: #2/3
show more ...
|
#
c6b6e18c |
| 14-Jun-2024 |
David Truby <david.truby@arm.com> |
[flang] Implement !DIR$ VECTOR ALWAYS (#93830)
This patch implements support for the VECTOR ALWAYS directive, which forces vectorization to occurr when possible regardless of a decision by the cost
[flang] Implement !DIR$ VECTOR ALWAYS (#93830)
This patch implements support for the VECTOR ALWAYS directive, which forces vectorization to occurr when possible regardless of a decision by the cost model. This is done by adding an attribute to the branch into the loop in LLVM to indicate that the loop should always be vectorized.
This patch only implements this directive on plan structured do loops without labels. Support for unstructured loops and array expressions is planned for future patches.
show more ...
|
#
b49f846f |
| 16-Aug-2023 |
Sergio Afonso <safonsof@amd.com> |
[Flang][OpenMP][Sema] Add directive rewrite pass to support atomic_default_mem_order REQUIRES clause
This patch creates the `OmpRewriteMutator` pass that runs at the end of `RewriteParseTree()`. Thi
[Flang][OpenMP][Sema] Add directive rewrite pass to support atomic_default_mem_order REQUIRES clause
This patch creates the `OmpRewriteMutator` pass that runs at the end of `RewriteParseTree()`. This pass is intended to make OpenMP-specific mutations to the PFT after name resolution.
In the case of the `atomic_default_mem_order` clause of the REQUIRES directive, name resolution results in populating global symbols with information about the REQUIRES clauses that apply to that scope. The new rewrite pass is then able to use this information in order to explicitly set the memory order of ATOMIC constructs for which that is not already specified.
Given that this rewrite happens before semantics checks, the check of the order in which ATOMIC constructs without explicit memory order and REQUIRES directives with `atomic_default_mem_order` appear is moved earlier into the rewrite pass. Otherwise, these problems would not be caught by semantics checks, since the PFT would be modified by that stage.
This is patch 4/5 of a series splitting D149337 to simplify review.
Depends on D157983.
Differential Revision: https://reviews.llvm.org/D158096
show more ...
|
#
f674ddc1 |
| 06-May-2023 |
Peter Klausler <pklausler@nvidia.com> |
[flang] CUDA Fortran - part 5/5: statement semantics
Canonicalize !$CUF KERNEL DO loop nests, similar to OpenACC/OpenMP canonicalization. Check statements and expressions in device contexts for usa
[flang] CUDA Fortran - part 5/5: statement semantics
Canonicalize !$CUF KERNEL DO loop nests, similar to OpenACC/OpenMP canonicalization. Check statements and expressions in device contexts for usage that isn't supported. Add more tests, and include some tweaks to standard modules needed to build CUDA Fortran modules.
Depends on https://reviews.llvm.org/D150159, https://reviews.llvm.org/D150161, https://reviews.llvm.org/D150162, & https://reviews.llvm.org/D150163.
Differential Revision: https://reviews.llvm.org/D150164
show more ...
|
#
838a4d34 |
| 18-Feb-2023 |
Kelvin Li <kli@ca.ibm.com> |
[Flang] Add PowerPC intrinsics
This patch adds a subset of PowerPC intrinsics - fmadd, fmsub, fnmadd and fnmsub.
Differential Revision: https://reviews.llvm.org/D143951
|
#
573fc618 |
| 17-Oct-2022 |
Peter Klausler <pklausler@nvidia.com> |
[flang] Fix pointer definition semantic checking via refactoring
The infrastructure in semantics that is used to check that the left-hand sides of normal assignment statements are really definable v
[flang] Fix pointer definition semantic checking via refactoring
The infrastructure in semantics that is used to check that the left-hand sides of normal assignment statements are really definable variables was not being used to check whether the LHSs of pointer assignments are modifiable, and so most cases of unmodifiable pointers are left undiagnosed. Rework the semantics checking for pointer assignments, NULLIFY statements, pointer dummy arguments, &c. so that cases of unmodifiable pointers are properly caught. This has been done by extracting all the various definability checking code that has been implemented for different contexts in Fortran into one new facility.
The new consolidated definability checking code returns messages meant to be attached as "because: " explanations to context-dependent errors like "left-hand side of assignment is not definable". These new error message texts and their attached explanations affect many existing tests, which have been updated. The testing infrastructure was extended by another patch to properly compare warnings and explanatory messages, which had been ignored until recently.
Differential Revision: https://reviews.llvm.org/D136979
show more ...
|
#
5d3249e9 |
| 24-Mar-2021 |
Tim Keith <tkeith@nvidia.com> |
[flang] Save binding labels as strings
Binding labels start as expressions but they have to evaluate to constant character of default kind, so they can be represented as an std::string. Leading and
[flang] Save binding labels as strings
Binding labels start as expressions but they have to evaluate to constant character of default kind, so they can be represented as an std::string. Leading and trailing blanks have to be removed, so the folded expression isn't exactly right anyway.
So all BIND(C) symbols now have a string binding label, either the default or user-supplied one. This is recorded in the .mod file.
Add WithBindName mix-in for details classes that can have a binding label so that they are all consistent. Add GetBindName() and SetBindName() member functions to Symbol.
Add tests that verifies that leading and trailing blanks are ignored in binding labels and that the default label is folded to lower case.
Differential Revision: https://reviews.llvm.org/D99208
show more ...
|
#
a76d0207 |
| 24-Mar-2021 |
Tim Keith <tkeith@nvidia.com> |
Revert "[flang] Save binding labels as strings"
This reverts commit eb4ad0e3e3635194c21dccdd1c52027e632d2996.
This was causing a crash compiling omp_lib.f90
|
#
eb4ad0e3 |
| 24-Mar-2021 |
Tim Keith <tkeith@nvidia.com> |
[flang] Save binding labels as strings
Binding labels start as expressions but they have to evaluate to constant character of default kind, so they can be represented as an std::string. Leading and
[flang] Save binding labels as strings
Binding labels start as expressions but they have to evaluate to constant character of default kind, so they can be represented as an std::string. Leading and trailing blanks have to be removed, so the folded expression isn't exactly right anyway.
So all BIND(C) symbols now have a string binding label, either the default or user-supplied one. This is recorded in the .mod file.
Add WithBindName mix-in for details classes that can have a binding label so that they are all consistent. Add GetBindName() and SetBindName() member functions to Symbol.
Add tests that verifies that leading and trailing blanks are ignored in binding labels and that the default label is folded to lower case.
Differential Revision: https://reviews.llvm.org/D99208
show more ...
|
#
4fede8bc |
| 07-Dec-2020 |
peter klausler <pklausler@nvidia.com> |
[flang] Implement derived type description table encoding
Define Fortran derived types that describe the characteristics of derived types, and instantiations of parameterized derived types, that are
[flang] Implement derived type description table encoding
Define Fortran derived types that describe the characteristics of derived types, and instantiations of parameterized derived types, that are of relevance to the runtime language support library. Define a suite of corresponding C++ structure types for the runtime library to use to interpret instances of the descriptions.
Create instances of these description types in Semantics as static initializers for compiler-created objects in the scopes that define or instantiate user derived types.
Delete obsolete code from earlier attempts to package runtime type information.
Differential Revision: https://reviews.llvm.org/D92802
show more ...
|
#
16c1d251 |
| 11-Aug-2020 |
Valentin Clement <clementval@gmail.com> |
[flang][directives] Use TableGen information for clause classes in parse-tree
This patch takes advantage of the directive information and tablegen generation to replace the clauses class parse tree
[flang][directives] Use TableGen information for clause classes in parse-tree
This patch takes advantage of the directive information and tablegen generation to replace the clauses class parse tree and in the dump parse tree sections.
Reviewed By: sscalpone
Differential Revision: https://reviews.llvm.org/D85549
show more ...
|
#
3b3dc1db |
| 11-Aug-2020 |
clementval <clementval@gmail.com> |
Revert "[flang][directives] Use TableGen information for clause classes in parse-tree"
This reverts commit bf93edc4758b512e84b70ec6335d15b0cf386a18.
Buildbot failure
|
#
bf93edc4 |
| 10-Aug-2020 |
Valentin Clement <clementval@gmail.com> |
[flang][directives] Use TableGen information for clause classes in parse-tree
This patch takes advantage of the directive information and tablegen generation to replace the clauses class parse tree
[flang][directives] Use TableGen information for clause classes in parse-tree
This patch takes advantage of the directive information and tablegen generation to replace the clauses class parse tree and in the dump parse tree sections.
Reviewed By: sscalpone
Differential Revision: https://reviews.llvm.org/D85549
show more ...
|
#
4ac617f4 |
| 07-Aug-2020 |
peter klausler <pklausler@nvidia.com> |
[flang] Handle DATA initialization of EQUIVALENCE'd objects
Objects that are storage associated by EQUIVALENCE and initialized with DATA are initialized by creating a compiler temporary data object
[flang] Handle DATA initialization of EQUIVALENCE'd objects
Objects that are storage associated by EQUIVALENCE and initialized with DATA are initialized by creating a compiler temporary data object in the same scope, assigning it an offset, type, and size that covers the transitive closure of the associated initialized original symbols, and combining their initializers into one common initializer for the temporary.
Some problems with offset assignment of EQUIVALENCE'd objects in COMMON were exposed and corrected, and some more error cases are checked.
Remove obsolete function. Small bugfix (nested implied dos). Add a test. Fix struct/class warning.
Differential Revision: https://reviews.llvm.org/D85560
show more ...
|
#
9500d48d |
| 28-Jul-2020 |
Tim Keith <tkeith@nvidia.com> |
[flang][NFC] Extract name resolution for OpenACC & OpenMP into new file
Move `ResolveAccParts` and `ResolveOmpParts` from resolve-names.cpp to resolve-directives.{h,cpp}. Move the implementation in
[flang][NFC] Extract name resolution for OpenACC & OpenMP into new file
Move `ResolveAccParts` and `ResolveOmpParts` from resolve-names.cpp to resolve-directives.{h,cpp}. Move the implementation in the classes `DirectiveAttributeVisitor`, `AccAttributeVisitor`, and `OmpAttributeVisitor` to resolve-directives.cpp as well.
To allow this to happen, move `EvaluateIntExpr` and introduce `EvaluateInt64` to resolve-names-utils.h. The latter is also useful elsewhere in resolve-names.cpp for converting an Expr to std::int64_t.
The other problem was that `ResolveDesignator` was called from the code that was moved. At the moment it doesn't seem to be doing anything so I removed the calls (and no tests failed). If it proves to be needed, we can either resolve those designators in resolve-names.cpp or pass the `ResolveDesignator` function in to the code that needs to call it.
Differential Revision: https://reviews.llvm.org/D84768
show more ...
|
#
920e127e |
| 16-Jul-2020 |
David Truby <david.truby@arm.com> |
[flang] Add missing link dependencies to FrontendOpenACC.
Summary: These link dependencies are required for shared library builds to work correctly.
Reviewers: clementval
Reviewed By: clementval
[flang] Add missing link dependencies to FrontendOpenACC.
Summary: These link dependencies are required for shared library builds to work correctly.
Reviewers: clementval
Reviewed By: clementval
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83938
show more ...
|
#
9aa3dca8 |
| 15-Jul-2020 |
Valentin Clement <clementval@gmail.com> |
[flang][openacc] Semantic checks for OpenACC 3.0 clauses validity
Summary: This patch adds semantic checking for the OpenACC 3.0 clauses validity.
Reviewers: sscalpone, tskeith, klausler, ichoyjx,
[flang][openacc] Semantic checks for OpenACC 3.0 clauses validity
Summary: This patch adds semantic checking for the OpenACC 3.0 clauses validity.
Reviewers: sscalpone, tskeith, klausler, ichoyjx, DavidTruby, jdoerfert
Reviewed By: tskeith, klausler
Subscribers: mgorny, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D83807
show more ...
|
#
8a8bb078 |
| 09-Jul-2020 |
peter klausler <pklausler@nvidia.com> |
[flang] Fix frontend build with -DBUILD_SHARED_LIBS=On
Fix fronted shared library builds by eliminating dependences of the parser on other component libraries, moving some code around that wasn't in
[flang] Fix frontend build with -DBUILD_SHARED_LIBS=On
Fix fronted shared library builds by eliminating dependences of the parser on other component libraries, moving some code around that wasn't in the right library, and making some dependences explicit in the CMakeLists.txt files. The lowering library does not yet build as a shared library due to some undefined names.
Reviewed By: tskeith
Differential Revision: https://reviews.llvm.org/D83515
show more ...
|
#
2ddba308 |
| 02-Jul-2020 |
Valentin Clement <clementval@gmail.com> |
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary: This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them with the newly table
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary: This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang, #clang
Differential Revision: https://reviews.llvm.org/D82906
show more ...
|
#
5c37b2a5 |
| 01-Jul-2020 |
clementval <clementval@gmail.com> |
Revert "[flang][openmp] Use common Directive and Clause enum from llvm/Frontend"
This reverts commit 7f1e7767952233d1b6af1feef1371d127de5fa50.
|
#
7f1e7767 |
| 01-Jul-2020 |
Valentin Clement <clementval@gmail.com> |
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary: This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them with the newly table
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Summary: This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.
Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx
Reviewed By: DavidTruby, ichoyjx
Subscribers: ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D82906
show more ...
|
#
70ad73b6 |
| 19-Apr-2020 |
sameeran joshi <sameeranjayant.joshi@amd.com> |
[flang] Semantics for SELECT TYPE
Summary: Added support for all semantic checks except C1157 was previously implemented.
Address review comments.
Reviewers: PeteSteinfeld, tsk
[flang] Semantics for SELECT TYPE
Summary: Added support for all semantic checks except C1157 was previously implemented.
Address review comments.
Reviewers: PeteSteinfeld, tskeith, klausler, DavidTruby, kiranktp, anchu-rajendran, sscalpone
Subscribers: kiranchandramohan, llvm-commits, flang-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D79851
show more ...
|
#
332e6aea |
| 22-Apr-2020 |
sameeran joshi <sameeranjayant.joshi@amd.com> |
[flang]Semantics for SELECT RANK.
Summary: Initially on github I worked on semantic checks.Then I tried some compile-time test of the rank value, they were failing as there were no symbo
[flang]Semantics for SELECT RANK.
Summary: Initially on github I worked on semantic checks.Then I tried some compile-time test of the rank value, they were failing as there were no symbols generated for them inside SELECT RANK's scope.So I went further to add new symbol in each scope, also added the respective 'rank: ' field for a symbol when we dump the symboltable. I added a field to keep track of the rank in AssocEntityDetails class.This caused shape analysis framework to become inconsistent. So shape analysis framework was updated to handle this new representation.
* I added more tests for above changes.
* On phabricator I addressed some minor changes.
* Lastly I worked on review comments.
Reviewers: klausler,sscalpone,DavidTruby,kiranchandramohan,tskeith,anchu-rajendran,kiranktp
Reviewed By:klausler, DavidTruby, tskeith
Subscribers:#flang-commits, #llvm-commits
Tags: #flang, #llvm
Differential Revision: https://reviews.llvm.org/D78623
show more ...
|
#
c353ebbf |
| 22-Apr-2020 |
Tim Keith <tkeith@nvidia.com> |
[flang] Compute sizes and offsets for symbols
Summary: Add size and offset properties to symbols, representing their byte size and offset within their enclosing scope.
Add size and align properties
[flang] Compute sizes and offsets for symbols
Summary: Add size and offset properties to symbols, representing their byte size and offset within their enclosing scope.
Add size and align properties to scopes so that they are available for scopes representing derived types.
Add ComputeOffsets pass over the symbol table to fill in those fields.
Compute descriptor size based on rank and length parameters. Extract DerivedTypeSpec::NumLengthParameters from DynamicType::RequiresDescriptor to share the code.
Add Scope::GetSymbols to get symbols in canonical order. compute-offsets.cpp and mod-file.cpp both need to process symbols in the order in which they are declared. Move the collecting of those symbols into Scope so that it can be shared.
Add symbol size and offset to output of `-fdebug-dump-symbols` and use that in some tests.
Still to do: - make size and alignment rules configurable based on target - use offsets to check EQUIVALENCE statements
Differential Revision: https://reviews.llvm.org/D78680
show more ...
|
#
2d6b9dbf |
| 16-Apr-2020 |
Mehdi Chinoune <chinoune.mehdi@hotmail.com> |
[flang] Use the Flang cmake-functions to add targets.
Summary: It also removes the cycle-dependency between FortranSemantics and FortranEvaluate.
Reviewers: #flang, jdoerfert, sscalpone
Reviewed B
[flang] Use the Flang cmake-functions to add targets.
Summary: It also removes the cycle-dependency between FortranSemantics and FortranEvaluate.
Reviewers: #flang, jdoerfert, sscalpone
Reviewed By: #flang, sscalpone
Subscribers: DavidTruby, schweitz, tskeith, mgorny, aartbik, llvm-commits
Tags: #flang, #llvm
Differential Revision: https://reviews.llvm.org/D78215
show more ...
|