|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
cd03e96f |
| 23-Mar-2022 |
Peter Klausler <[email protected]> |
[flang] Add & use a better visit() (take 2)
Adds flang/include/flang/Common/log2-visit.h, which defines a Fortran::common::visit() template function that is a drop-in replacement for std::visit().
[flang] Add & use a better visit() (take 2)
Adds flang/include/flang/Common/log2-visit.h, which defines a Fortran::common::visit() template function that is a drop-in replacement for std::visit(). Modifies most use sites in the front-end and runtime to use common::visit().
The C++ standard mandates that std::visit() have O(1) execution time, which forces implementations to build dispatch tables. This new common::visit() is O(log2 N) in the number of alternatives in a variant<>, but that N tends to be small and so this change produces a fairly significant improvement in compiler build memory requirements, a 5-10% improvement in compiler build time, and a small improvement in compiler execution time.
Building with -DFLANG_USE_STD_VISIT causes common::visit() to be an alias for std::visit().
Calls to common::visit() with multiple variant arguments are referred to std::visit(), pending further work.
This change is enabled only for GCC builds with GCC >= 9; an earlier attempt (D122441) ran into bugs in some versions of clang and was reverted rather than simply disabled; and it is not well tested with MSVC. In non-GCC and older GCC builds, common::visit() is simply an alias for std::visit().
show more ...
|
| #
7e225423 |
| 15-Apr-2022 |
Peter Klausler <[email protected]> |
[flang] Finer control over error recovery with GetExpr()
Prior to this patch, the semantics utility GetExpr() will crash unconditionally if it encounters a typed expression in the parse tree that ha
[flang] Finer control over error recovery with GetExpr()
Prior to this patch, the semantics utility GetExpr() will crash unconditionally if it encounters a typed expression in the parse tree that has not been set by expression semantics. This is the right behavior when called from lowering, by which time it is known that the program had no fatal user errors, since it signifies a fatal internal error. However, prior to lowering, in the statement semantics checking code, a more nuanced test should be used before crashing -- specifically, we should not crash in the face of a missing typed expression when in error recovery mode.
Getting this right requires GetExpr() and its helper class to have access to the semantics context, so that it can check AnyFatalErrors() before crashing. So this patch touches nearly all of its call sites.
Differential Revision: https://reviews.llvm.org/D123873
show more ...
|
| #
4ca111d4 |
| 28-Mar-2022 |
Andrzej Warzynski <[email protected]> |
Revert "[flang] Add & use a better visit()"
This reverts commit 2ab9990c9eb79682a4d4b183dfbc7612d3e55328. It has caused multiple build failures: * https://lab.llvm.org/buildbot/#/builders/177/build
Revert "[flang] Add & use a better visit()"
This reverts commit 2ab9990c9eb79682a4d4b183dfbc7612d3e55328. It has caused multiple build failures: * https://lab.llvm.org/buildbot/#/builders/177/builds/4346 * https://lab.llvm.org/buildbot/#/builders/180/builds/3803 * https://lab.llvm.org/buildbot/#/builders/175/builds/10419 * https://lab.llvm.org/buildbot/#/builders/191/builds/4318 * https://lab.llvm.org/buildbot/#/builders/173/builds/4274 * https://lab.llvm.org/buildbot/#/builders/181/builds/4297
All these bots failed with a time-out: ``` command timed out: 1200 seconds without output running [b'ninja', b'-j', b'32'], attempting to kill ``` I'm guessing that that's due to template instantiations failing at some point (https://reviews.llvm.org/D122441 introduced a custom implementation of std::visit). Everything seems fine when either: * building on X86 with GCC or Clang (tested with GCC 9.3 and Clang 12) * building on AArch64 with GCC (tested with GCC 11)
show more ...
|
| #
2ab9990c |
| 23-Mar-2022 |
Peter Klausler <[email protected]> |
[flang] Add & use a better visit()
Adds flang/include/flang/Common/visit.h, which defines a Fortran::common::visit() template function that is a drop-in replacement for std::visit(). Modifies most
[flang] Add & use a better visit()
Adds flang/include/flang/Common/visit.h, which defines a Fortran::common::visit() template function that is a drop-in replacement for std::visit(). Modifies most use sites in the front-end and runtime to use common::visit().
The C++ standard mandates that std::visit() have O(1) execution time, which forces implementations to build dispatch tables. This new common::visit() is O(log2 N) in the number of alternatives in a variant<>, but that N tends to be small and so this change produces a fairly significant improvement in compiler build memory requirements, a 5-10% improvement in compiler build time, and a small improvement in compiler execution time.
Building with -DFLANG_USE_STD_VISIT causes common::visit() to be an alias for std::visit().
Calls to common::visit() with multiple variant arguments are referred to std::visit(), pending further work.
Differential Revision: https://reviews.llvm.org/D122441
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4 |
|
| #
0d9b0f64 |
| 11-Mar-2022 |
Peter Klausler <[email protected]> |
[flang] IEEE_ARITHMETIC must imply USE IEEE_EXCEPTIONS
The intrinsic module IEEE_ARITHMETIC must incorporate the public names from the intrisic module IEEE_EXCEPTIONS. Rename IEEE_EXCEPTIONS to __F
[flang] IEEE_ARITHMETIC must imply USE IEEE_EXCEPTIONS
The intrinsic module IEEE_ARITHMETIC must incorporate the public names from the intrisic module IEEE_EXCEPTIONS. Rename IEEE_EXCEPTIONS to __Fortran_ieee_exceptions so that it won't clash with the nonintrinsic namespace, establish a new intrinic IEEE_EXCEPTIONS module that USEs it, and add a USE to IEEE_ARITHMETIC.
Updated to use STREQUAL rather than ambiguous MATCHES in the CMakeLists.txt file.
Differential Revision: https://reviews.llvm.org/D121490
show more ...
|
| #
75d74d99 |
| 14-Mar-2022 |
Andrzej Warzynski <[email protected]> |
Revert "[flang] IEEE_ARITHMETIC must imply USE IEEE_EXCEPTIONS"
This reverts commit b6a7600491d755f6f700fe245b2fc7b928264c58. It caused the following build failure: ``` ninja: error: dependency cycl
Revert "[flang] IEEE_ARITHMETIC must imply USE IEEE_EXCEPTIONS"
This reverts commit b6a7600491d755f6f700fe245b2fc7b928264c58. It caused the following build failure: ``` ninja: error: dependency cycle: include/flang/__fortran_ieee_exceptions.mod -> include/flang/__fortran_ieee_exceptions.mod ```
See e.g.: * https://lab.llvm.org/buildbot/#/builders/172/builds/9595
To reproduce: ``` cmake -G Ninja \ -DLLVM_TARGETS_TO_BUILD=host \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_PROJECTS="clang;flang" \ ../../llvm ninja check-flang ```
show more ...
|
| #
b6a76004 |
| 11-Mar-2022 |
Peter Klausler <[email protected]> |
[flang] IEEE_ARITHMETIC must imply USE IEEE_EXCEPTIONS
The intrinsic module IEEE_ARITHMETIC must incorporate the public names from the intrisic module IEEE_EXCEPTIONS. Rename IEEE_EXCEPTIONS to __F
[flang] IEEE_ARITHMETIC must imply USE IEEE_EXCEPTIONS
The intrinsic module IEEE_ARITHMETIC must incorporate the public names from the intrisic module IEEE_EXCEPTIONS. Rename IEEE_EXCEPTIONS to __Fortran_ieee_exceptions so that it won't clash with the nonintrinsic namespace, establish a new intrinic IEEE_EXCEPTIONS module that USEs it, and add a USE to IEEE_ARITHMETIC.
Differential Revision: https://reviews.llvm.org/D121490
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc3 |
|
| #
a53967cd |
| 07-Mar-2022 |
Peter Klausler <[email protected]> |
[flang] Distinguish usage and portability warning messages
Using recently established message severity codes, upgrade non-fatal messages to usage and portability warnings as appropriate.
Differenti
[flang] Distinguish usage and portability warning messages
Using recently established message severity codes, upgrade non-fatal messages to usage and portability warnings as appropriate.
Differential Revision: https://reviews.llvm.org/D121246
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
1ee6f7ad |
| 18-Nov-2021 |
Peter Klausler <[email protected]> |
[flang] Rearrange prototype & code placement of IsCoarray()
A quick fix last week to the shared library build caused the predicate IsCoarray(const Symbol &) to be moved from Semantics to Evaluate.
[flang] Rearrange prototype & code placement of IsCoarray()
A quick fix last week to the shared library build caused the predicate IsCoarray(const Symbol &) to be moved from Semantics to Evaluate. This patch completes that move in a way that properly combines the existing IsCoarray() tests for expressions and other object with the test for a symbol.
Differential Revision: https://reviews.llvm.org/D114806
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
| #
0d8331c0 |
| 18-Mar-2021 |
peter klausler <[email protected]> |
[flang] Refine symbol sorting
Replace semantics::SymbolSet with alternatives that clarify whether the set should order its contents by source position or not. This matters because positionally-orde
[flang] Refine symbol sorting
Replace semantics::SymbolSet with alternatives that clarify whether the set should order its contents by source position or not. This matters because positionally-ordered sets must not be used for Symbols that might be subjected to name replacement during name resolution, and address-ordered sets must not be used (without sorting) in circumstances where the order of their contents affects the output of the compiler.
All set<> and map<> instances in the compiler that are keyed by Symbols now have explicit Compare types in their template instantiations. Symbol::operator< is no more.
Differential Revision: https://reviews.llvm.org/D98878
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2 |
|
| #
a50bb84e |
| 12-Jan-2021 |
peter klausler <[email protected]> |
[flang] Fix classification of shape inquiries in specification exprs
In some contexts, including the motivating case of determining whether the expressions that define the shape of a variable are "c
[flang] Fix classification of shape inquiries in specification exprs
In some contexts, including the motivating case of determining whether the expressions that define the shape of a variable are "constant expressions" in the sense of the Fortran standard, expression rewriting via Fold() is not necessary, and should not be required. The inquiry intrinsics LBOUND, UBOUND, and SIZE work correctly now in specification expressions and are classified correctly as being constant expressions (or not). Getting this right led to a fair amount of API clean-up as a consequence, including the folding of shapes and TypeAndShape objects, and new APIs for shapes that do not fold for those cases where folding isn't needed. Further, the symbol-testing predicate APIs in Evaluate/tools.h now all resolve any associations of their symbols and work transparently on use-, host-, and construct-association symbols; the tools used to resolve those associations have been defined and documented more precisely, and their clients adjusted as needed.
Differential Revision: https://reviews.llvm.org/D94561
show more ...
|
|
Revision tags: llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
| #
641ede93 |
| 07-Dec-2020 |
peter klausler <[email protected]> |
[flang] Improve initializer semantics, esp. for component default values
This patch plugs many holes in static initializer semantics, improves error messages for default initial values and other com
[flang] Improve initializer semantics, esp. for component default values
This patch plugs many holes in static initializer semantics, improves error messages for default initial values and other component properties in parameterized derived type instantiations, and cleans up several small issues noticed during development. We now do proper scalar expansion, folding, and type, rank, and shape conformance checking for component default initializers in derived types and PDT instantiations. The initial values of named constants are now guaranteed to have been folded when installed in the symbol table, and are no longer folded or scalar-expanded at each use in expression folding. Semantics documentation was extended with information about the various kinds of initializations in Fortran and when each of them are processed in the compiler.
Some necessary concomitant changes have bulked this patch out a bit: * contextual messages attachments, which are now produced for parameterized derived type instantiations so that the user can figure out which instance caused a problem with a component, have been added as part of ContextualMessages, and their implementation was debugged * several APIs in evaluate::characteristics was changed so that a FoldingContext is passed as an argument rather than just its intrinsic procedure table; this affected client call sites in many files * new tools in Evaluate/check-expression.cpp to determine when an Expr actually is a single constant value and to validate a non-pointer variable initializer or object component default value * shape conformance checking has additional arguments that control whether scalar expansion is allowed * several now-unused functions and data members noticed and removed * several crashes and bogus errors exposed by testing this new code were fixed * a -fdebug-stack-trace option to enable LLVM's stack tracing on a crash, which might be useful in the future
TL;DR: Initialization processing does more and takes place at the right times for all of the various kinds of things that can be initialized.
Differential Review: https://reviews.llvm.org/D92783
show more ...
|
|
Revision tags: llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6 |
|
| #
4a51691a |
| 06-Oct-2020 |
sameeran joshi <[email protected]> |
[Flang][OpenACC] Fix for branching out issue in OpenACC parallel construct.
From OpenACC 3.0 Standards document 840 • A program may not branch into or out of an OpenACC parallel construct. Exits
[Flang][OpenACC] Fix for branching out issue in OpenACC parallel construct.
From OpenACC 3.0 Standards document 840 • A program may not branch into or out of an OpenACC parallel construct. Exits are allowed provided it does not cause an exit outside the parallel region.
Test case exits out of the inner do loop, but it is still inside the parallel region. Patch tries to extract labels from block attached to a construct, If the exit is to a label not in the collected list then flags an error.
Reviewed By: tskeith
Differential Revision: https://reviews.llvm.org/D87906
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
4171f80d |
| 19-Jun-2020 |
peter klausler <[email protected]> |
[flang] DATA stmt processing (part 3/4): Remaining prep work
Rolls up small changes across the frontend to prepare for the large forthcoming patch (part 4/4) that completes DATA statement processing
[flang] DATA stmt processing (part 3/4): Remaining prep work
Rolls up small changes across the frontend to prepare for the large forthcoming patch (part 4/4) that completes DATA statement processing via conversion to initializers.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D82137
show more ...
|
| #
4d8c00c0 |
| 03-Jun-2020 |
Pete Steinfeld <[email protected]> |
[flang] Fix crash on erroneous expressions
Summary: If you create an expression with parse errors, the `parser::Expr.typedExpr` will be empty, which causes a compiler crash. The crash is caused by
[flang] Fix crash on erroneous expressions
Summary: If you create an expression with parse errors, the `parser::Expr.typedExpr` will be empty, which causes a compiler crash. The crash is caused by the check in check-do-forall.cpp that scans all expresssions to see if `DO` variables are being modified.
It turned out that the problem was that I was fetching subexpressions of type `parser::Expr`, which are not guaranteed to have a non-null `typedExpr`. I fixed this by only grabbing the top-level expression from which to gather arguments as part of the DO loop analysis. This, in turn, exposed a problem where I wasn't collecting all of the actual arguments in an expression. This was caused by the fact that I wasn't recursing through the rest of the expression after finding an argument. I fixed this by recursing through the argument in the member function in `CollectActualArgumentsHelper`.
Reviewers: klausler, tskeith, DavidTruby
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81101
show more ...
|
|
Revision tags: llvmorg-10.0.1-rc1 |
|
| #
1f879005 |
| 29-Mar-2020 |
Tim Keith <[email protected]> |
[flang] Reformat with latest clang-format and .clang-format
Original-commit: flang-compiler/f18@9fe84f45d7fd685051004678d6b5775dcc4c6f8f Reviewed-on: https://github.com/flang-compiler/f18/pull/1094
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6 |
|
| #
cc77f818 |
| 19-Mar-2020 |
David Truby <[email protected]> |
[flang] Add explicit nullptr check in initialisation of inDoConstruct.
This explicit check is needed as we are using braced initialisation here so implicit narrowing conversions (such as pointer to
[flang] Add explicit nullptr check in initialisation of inDoConstruct.
This explicit check is needed as we are using braced initialisation here so implicit narrowing conversions (such as pointer to bool) are not allowed.
Original-commit: flang-compiler/f18@ff8dad10bffb70666ba3b4ff229dc4b608f9e116 Reviewed-on: https://github.com/flang-compiler/f18/pull/1083
show more ...
|
|
Revision tags: llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
| #
c8756185 |
| 22-Feb-2020 |
Tim Keith <[email protected]> |
[flang] Remove use of std::set::merge
Some versions of clang that we are building with don't have std::set::merge, even though it is part of C++17. Work around that by using std::set::insert until w
[flang] Remove use of std::set::merge
Some versions of clang that we are building with don't have std::set::merge, even though it is part of C++17. Work around that by using std::set::insert until we can count on merge being available everywhere.
Original-commit: flang-compiler/f18@886ccc37fbff5df00717ac728e2aba240d0a314c Reviewed-on: https://github.com/flang-compiler/f18/pull/1014
show more ...
|
| #
64ab3302 |
| 25-Feb-2020 |
CarolineConcatto <[email protected]> |
[flang] [LLVMify F18] Compiler module folders should have capitalised names (flang-compiler/f18#980)
This patch renames the modules in f18 to use a capital letter in the
module name
Signed-off-b
[flang] [LLVMify F18] Compiler module folders should have capitalised names (flang-compiler/f18#980)
This patch renames the modules in f18 to use a capital letter in the
module name
Signed-off-by: Caroline Concatto <[email protected]>
Original-commit: flang-compiler/f18@d2eb7a1c443d1539ef12b6f027074a0eb15b1ea0 Reviewed-on: https://github.com/flang-compiler/f18/pull/980
show more ...
|