| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[flang][OpenMP] Split check-omp-structure.cpp into smaller files, NFC (#146359) Create these new files in flang/lib/Semantics: openmp-utils.cpp/.h - Common utilities check-omp-atomic.cpp - Atomic-related checks check-omp-loop.cpp - Loop constructs/clauses check-omp-metadirective.cpp - Metadirective-related checks Update lists of included headers, std in particular. --------- Co-authored-by: Jack Styles <jack.styles@arm.com> | 1 年前 | |
[flang][NFC] Use parser::Unwrap(Ref) more (#162918) Replace more parse tree references to "thing" and "value()" with usage of the parser::Unwrap<> template function. Add parser::UnwrapRef<> as an alias for DEREF(Unwrap<>()). | 10 个月前 | |
[flang][cuda] Do not produce data transfer in offloaded do concurrent (#147435) If a do concurrent loop is offloaded then there should be no CUDA data transfer in it. Update the semantic and lowering to take that into account. AssignmentChecker has to be put into a separate pass because the checkers in SemanticsVisitor cannot have the same Enter/Leave functions. The DoForallChecker already has Eneter/Leave functions for the DoConstruct. | 1 年前 | |
[flang] Restore ENUM_CLASS() to be compilation-time code Rework some recent changes to the ENUM_CLASS() macro so that all of the construction of enumerator-to-name string mapping data structures is again performed at compilation time. Differential Revision: https://reviews.llvm.org/D137859 | 3 年前 | |
[flang][acc] allow and ignore DIR between ACC and loops (#106522) The current pattern was failing OpenACC semantics in acc parse tree canonicalization: !acc loop !dir vector aligned do i=1,n ... Fix it by moving the directive before the OpenACC construct node. Note that I think it could make sense to propagate the $dir info to the acc.loop, at least with classic flang, the $dir seems to make a difference. This is not done here since few directives are supported anyway. | 2 年前 | |
[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 | 6 年前 | |
[flang] Implement !DIR$ IVDEP directive (#133728) This directive tells the compiler to ignore vector dependencies in the following loop and it must be placed before a do loop. Sometimes the compiler may not have sufficient information to decide whether a particular loop is vectorizable due to potential dependencies between iterations and the directive is here to tell to the compiler that vectorization is safe with parallelAccesses metadata. This directive is also equivalent to #pragma clang loop assume(safety) in C++ | 9 个月前 | |
[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. | 2 年前 | |
[flang] Add missing include, fix build break after c81a189c50 (#169192) | 9 个月前 | |
[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 | 6 年前 | |
[flang][OpenMP] Implement loop nest parser (#168884) 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. | 9 个月前 | |
[flang][OpenMP] Sema checks, lowering with new format of MAP modifiers (#149137) 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. | 1 年前 | |
[flang] Move parse tree tool to Parser/tools.h (#163998) Move the parse tree utility function semantics::getDesignatorNameIfDataRef to Parser/tools.h and rename it to comply with the local style. | 10 个月前 | |
[flang][acc] Allow nested gang loops inside acc routines (#158693) The following commit incorrectly prohibited nested gang loops inside acc routines. This PR limits the restriction to loops within kernels constructs only. https://github.com/llvm/llvm-project/commit/8470027f257a3304b2abe50e5663bcd711f6ca29 | 11 个月前 | |
[flang][semantics] add semantic check that STAT and ERRMSG are not (de)allocated by same statement (#164529) Almost all compilers statically error on the following case even though it isn't a numbered constraint. Now we do to instead segfaulting at runtime. fortran integer,pointer:: i allocate(i,stat=i) end | 10 个月前 | |
[flang][semantics] add semantic check that STAT and ERRMSG are not (de)allocated by same statement (#164529) Almost all compilers statically error on the following case even though it isn't a numbered constraint. Now we do to instead segfaulting at runtime. fortran integer,pointer:: i allocate(i,stat=i) end | 10 个月前 | |
[flang] Add UNSIGNED (#113504) Implement the UNSIGNED extension type and operations under control of a language feature flag (-funsigned). This is nearly identical to the UNSIGNED feature that has been available in Sun Fortran for years, and now implemented in GNU Fortran for gfortran 15, and proposed for ISO standardization in J3/24-116.txt. See the new documentation for details; but in short, this is C's unsigned type, with guaranteed modular arithmetic for +, -, and *, and the related transformational intrinsic functions SUM & al. | 1 年前 | |
[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 | 6 年前 | |
[flang] Fixed regression in copy-in/copy-out (#161259) Fixed the polymprphic check for copy-in/copy-out, added regression tests. Changed MayNeedCopy() to return std::optional<bool> and renamed it to ActualArgNeedsCopy(). This function now returns true/false when it's known that actual arguments needs copy in/out, or std::nullopt to signify that it's now known, whether copy in/out is needed. Fixes #159149 | 9 个月前 | |
[flang] More information on generic resolution failures (#164738) When a generic procedure reference does not match any of its specific procedures, run through them and emit the errors for each attempted match, so that the user has more information to resolve the problem by adjusting the actual arguments. | 10 个月前 | |
[flang][NFC] Use parser::Unwrap(Ref) more (#162918) Replace more parse tree references to "thing" and "value()" with usage of the parser::Unwrap<> template function. Add parser::UnwrapRef<> as an alias for DEREF(Unwrap<>()). | 10 个月前 | |
[flang] Semantics for SELECT CASE Prep for review Respond to review comments Fix first line in new test Original-commit: flang-compiler/f18@12f6f30600db4cb3902677cd42764450ddeda5e0 Reviewed-on: https://github.com/flang-compiler/f18/pull/1089 | 6 年前 | |
[flang][NFC] Use parser::Unwrap(Ref) more (#162918) Replace more parse tree references to "thing" and "value()" with usage of the parser::Unwrap<> template function. Add parser::UnwrapRef<> as an alias for DEREF(Unwrap<>()). | 10 个月前 | |
[flang] Revamp evaluate::CoarrayRef (#136628) Bring the typed expression representation of a coindexed reference up to F'2023, which removed some restrictions that had allowed the current representation to suffice for older revisions of the language. This new representation is somewhat more simple -- it uses a DataRef as its base, so any subscripts in a part-ref can be represented as an ArrayRef there. Update the code that creates the CoarrayRef, and add more checking to it, as well as actually capturing any STAT=, TEAM=, & TEAM_NUMBER= specifiers that might appear. Enforce the constraint that the part-ref must have subscripts if it is an array. (And update a pile of copied-and-pasted test code that lacked such subscripts.) | 1 年前 | |
[flang][cuda] Do not consider function result as host array (#164669) The function result in a device function is not a host array. Avoid triggering the error Host array 'res' cannot be present in device context for this. | 10 个月前 | |
[flang][cuda] Emit error when trying to print device data (#160395) | 11 个月前 | |
[flang][NFC] Use parser::Unwrap(Ref) more (#162918) Replace more parse tree references to "thing" and "value()" with usage of the parser::Unwrap<> template function. Add parser::UnwrapRef<> as an alias for DEREF(Unwrap<>()). | 10 个月前 | |
[flang] Process legacy DATA-style /initializers/ sooner (#162722) The compiler can't defer the conversion of legacy DATA-style /initializers/ in component declarations to their init() expressions to the general DATA statement conversion pass, since default component values must be present during structure constructor analysis. So move their conversions into name resolution and handle them at the same times as standard '=' initializers are processed. Avoid any potential problems with type parameters being used as repetition counts or values by disallowing legacy DATA-style initializers in PDTs. Fixes https://github.com/llvm/llvm-project/issues/161989. | 10 个月前 | |
[flang][semantics] add semantic check that STAT and ERRMSG are not (de)allocated by same statement (#164529) Almost all compilers statically error on the following case even though it isn't a numbered constraint. Now we do to instead segfaulting at runtime. fortran integer,pointer:: i allocate(i,stat=i) end | 10 个月前 | |
[flang] Use definability tests for better PURE constraint checking Many semantic checks for constraints related to PURE subprograms can be implemented in terms of Semantics' "definable.h" utilities, slightly expanded. Replace some particular PURE constraint checks with calls to WhyNotDefinable(), except for cases that had better specific error messages, and start checking some missing constraints with DEALLOCATE statements and local variable declarations. Differential Revision: https://reviews.llvm.org/D147389 | 3 年前 | |
[flang] Adding NOTIFY specifier in image selector and add notify type checks (#148810) This PR adds support for the NOTIFY specifier in the image selector as described in the 2023 standard, and add checks for the NOTIFY_TYPE type. | 10 个月前 | |
[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 | 5 年前 | |
[Flang] Add standalone tile support (#160298) Add support for the standalone OpenMP tile construct: f90 !$omp tile sizes(...) DO i = 1, 100 ... This is complementary to #143715 which added support for the tile construct as part of another loop-associated construct such as worksharing-loop, distribute, etc. | 11 个月前 | |
[flang][NFC] Use parser::Unwrap(Ref) more (#162918) Replace more parse tree references to "thing" and "value()" with usage of the parser::Unwrap<> template function. Add parser::UnwrapRef<> as an alias for DEREF(Unwrap<>()). | 10 个月前 | |
[flang] Check I/O implied DO indices better (#159150) We're not checking READ statement implied DO index variables at all, and we're not checking them for definability. | 11 个月前 | |
[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 | 6 年前 | |
[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 | 6 年前 | |
[flang][NFC] Use parser::Unwrap(Ref) more (#162918) Replace more parse tree references to "thing" and "value()" with usage of the parser::Unwrap<> template function. Add parser::UnwrapRef<> as an alias for DEREF(Unwrap<>()). | 10 个月前 | |
[flang] Warn on useless IOMSG= (#102250) An I/O statement with IOMSG= but neither ERR= nor IOSTAT= deserves a warning to the effect that it's not useful. | 2 年前 | |
[flang][Semantics][OpenMP] don't reduce variables in namelist (#110671) This is allowed by the OpenMP and F23 standards. But variables in a namelist are not allowed in OpenMP privatisation. I suspect this was an oversight. If we allow this we run into problems masking the original symbol with the symbol for the reduction variable when the variable is accessed via a namelist initialised as a global variable. See #101907. One solution for this would be to force the namelist to always be initilized inside of the block in which it is used (therefore using the correct mapping for the reduction variable), but this could make some production applications slow. I tentatively think it is probably better to disallow a (perhaps mistaken) edge case of the standards with (I think) little practical use, than to make real applications slow in order to make this work. If reviewers would rather keep to the letter of the standard, see #109303 which implements the alternative solution. I'm open to either path forward. Fixes #101907 | 1 年前 | |
[flang][Semantics][OpenMP] don't reduce variables in namelist (#110671) This is allowed by the OpenMP and F23 standards. But variables in a namelist are not allowed in OpenMP privatisation. I suspect this was an oversight. If we allow this we run into problems masking the original symbol with the symbol for the reduction variable when the variable is accessed via a namelist initialised as a global variable. See #101907. One solution for this would be to force the namelist to always be initilized inside of the block in which it is used (therefore using the correct mapping for the reduction variable), but this could make some production applications slow. I tentatively think it is probably better to disallow a (perhaps mistaken) edge case of the standards with (I think) little practical use, than to make real applications slow in order to make this work. If reviewers would rather keep to the letter of the standard, see #109303 which implements the alternative solution. I'm open to either path forward. Fixes #101907 | 1 年前 | |
[flang] Downgrade error message to a portability warning (#98368) f18 current emits an error when an assignment is made to an array section with a vector subscript, and the array is finalized with a non-elemental final subroutine. Some other compilers emit this error because (I think) they want variables to only be finalized in place, not by a subroutine call involving copy-in & copy-out of the finalized elements. Since many other Fortran compilers can handle this case, and there's nothing in the standards to preclude it, let's downgrade this error message to a portability warning. This patch got complicated because the API for the WhyNotDefinable() utility routine was such that it would return a message only in error cases, and there was no provision for returning non-fatal messages. It now returns either nothing, a fatal message, or a non-fatal warning message, and all of its call sites have been modified to cope. | 2 年前 | |
[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 | 6 年前 | |
[flang][OpenMP] Move two utilities from Semantics to Parser, NFC (#168549) Move GetInnermostExecPart and IsStrictlyStructuredBlock from Semantics/openmp-utils.* to Parser/openmp-utils.*. These two only depend on the AST contents and properties. | 9 个月前 | |
[flang][OpenMP] Tolerate compiler directives in loop constructs (#169346) PR168884 flagged compiler directives (!dir$ ...) inside OpenMP loop constructs as errors. This caused some customer applications to fail to compile (issue 169229). Downgrade the error to a warning, and gracefully ignore compiler directives when lowering loop constructs to MLIR. Fixes https://github.com/llvm/llvm-project/issues/169229 | 9 个月前 | |
[flang][OpenMP] Use OmpDirectiveSpecification in METADIRECTIVE (#159577) | 11 个月前 | |
[flang][OpenMP] Better diagnostics for invalid or misplaced directives (#168885) Add two more AST nodes, one for a misplaced end-directive, and one for an invalid string following the OpenMP sentinel (e.g. "!$OMP XYZ"). Emit error messages when either node is encountered in semantic analysis. | 9 个月前 | |
[flang][OpenMP] Better diagnostics for invalid or misplaced directives (#168885) Add two more AST nodes, one for a misplaced end-directive, and one for an invalid string following the OpenMP sentinel (e.g. "!$OMP XYZ"). Emit error messages when either node is encountered in semantic analysis. | 9 个月前 | |
[flang] Warn about undefined function results (#99533) When the result of a function never appears in a variable definition context, emit a warning. If the function has multiple result variables due to alternate ENTRY statements, any definition will suffice. The implementation of this check is tied to the general variable definability checking utility in semantics. Every variable definition context uses it to ensure that no undefinable variable is being defined. A set of defined variables is maintained in the SemanticsContext and, when the warning is enabled and no fatal error has been reported, the scope tree is traversed and all the function subprograms' results are tested for membership in that set. | 2 年前 | |
[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 | 6 年前 | |
[Flang] Move non-common headers to FortranSupport (#124416) 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 <optional> 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. | 1 年前 | |
[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 | 6 年前 | |
[flang] Consolidate copy-in/copy-out determination in evaluate framework (#151408) New implementation of MayNeedCopy() is used to consolidate copy-in/copy-out checks. IsAssumedShape() and IsAssumedRank() were simplified and are both now in Fortran::semantics workspace. preparePresentUserCallActualArgument() in lowering was modified to use MayNeedCopyInOut() Fixes https://github.com/llvm/llvm-project/issues/138471 | 1 年前 | |
[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 | 6 年前 | |
[flang] Consolidate copy-in/copy-out determination in evaluate framework (#151408) New implementation of MayNeedCopy() is used to consolidate copy-in/copy-out checks. IsAssumedShape() and IsAssumedRank() were simplified and are both now in Fortran::semantics workspace. preparePresentUserCallActualArgument() in lowering was modified to use MayNeedCopyInOut() Fixes https://github.com/llvm/llvm-project/issues/138471 | 1 年前 | |
[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 | 6 年前 | |
[Flang] Move non-common headers to FortranSupport (#124416) 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 <optional> 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. | 1 年前 | |
[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 | 6 年前 | |
[flang][OpenMP] Fix offsets for EQUIVALENCE in firstprivate(/block/) (#156492) When a common block appears in firstprivate, its contents become host associations, which the symbol offset computation code for equivalences wasn't expecting. Add a GetUltimate() call, and extend symbol dumping for HostAssocDetails. | 1 年前 | |
[flang] Implement STORAGE_SIZE(), SIZEOF(), C_SIZEOF() STORAGE_SIZE() is a standard inquiry intrinsic (size in bits of an array element of the same type as the argument); SIZEOF() is a common extension that returns the size in bytes of its argument; C_SIZEOF() is a renaming of SIZEOF() in module ISO_C_BINDING. STORAGE_SIZE() and SIZEOF() are implemented via rewrites to expressions; these expressions will be constant when the necessary type parameters and bounds are also constant. Code to calculate the sizes of types (with and without alignment) was isolated into Evaluate/type.* and /characteristics.*. Code in Semantics/compute-offsets.* to calculate sizes and alignments of derived types' scopes was exposed so that it can be called at type instantiation time (earlier than before) so that these inquiry intrinsics could be called from specification expressions. Differential Revision: https://reviews.llvm.org/D93322 | 5 年前 | |
[flang][NFC] Use parser::Unwrap(Ref) more (#162918) Replace more parse tree references to "thing" and "value()" with usage of the parser::Unwrap<> template function. Add parser::UnwrapRef<> as an alias for DEREF(Unwrap<>()). | 10 个月前 | |
[Flang] Move non-common headers to FortranSupport (#124416) 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 <optional> 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. | 1 年前 | |
[flang] Fix spurious error on defined assignment in PURE (#139186) An assignment to a whole polymorphic object in a PURE subprogram that is implemented by means of a defined assignment procedure shouldn't be subjected to the same definability checks as it would be for an intrinsic assignment (which would also require it to be allocatable). Fixes https://github.com/llvm/llvm-project/issues/139129. | 1 年前 | |
[flang] Fix spurious error on defined assignment in PURE (#139186) An assignment to a whole polymorphic object in a PURE subprogram that is implemented by means of a defined assignment procedure shouldn't be subjected to the same definability checks as it would be for an intrinsic assignment (which would also require it to be allocatable). Fixes https://github.com/llvm/llvm-project/issues/139129. | 1 年前 | |
[flang] Adding NOTIFY specifier in image selector and add notify type checks (#148810) This PR adds support for the NOTIFY specifier in the image selector as described in the 2023 standard, and add checks for the NOTIFY_TYPE type. | 10 个月前 | |
[flang] Use instantiated PDT for structure constructor in default init (#167409) A structure constructor used in (or as) the default component initializer for a PDT derived type component needs to traverse the scope of the right PDT instantiation. Fixes https://github.com/llvm/llvm-project/issues/167337 and fixes https://github.com/llvm/llvm-project/issues/167573. | 9 个月前 | |
[Flang][OpenMP] Update declare mapper lookup via use-module (#167903) | 9 个月前 | |
[flang][openmp]Add UserReductionDetails and use in DECLARE REDUCTION (#140066) This adds another puzzle piece for the support of OpenMP DECLARE REDUCTION functionality. This adds support for operators with derived types, as well as declaring multiple different types with the same name or operator. A new detail class for UserReductionDetials is introduced to hold the list of types supported for a given reduction declaration. Tests for parsing and symbol generation added. Declare reduction is still not supported to lowering, it will generate a "Not yet implemented" fatal error. Fixes #141306 Fixes #97241 Fixes #92832 Fixes #66453 --------- Co-authored-by: Mats Petersson <mats.petersson@arm.com> | 1 年前 | |
[flang][OpenMP] Explicitly set Shared DSA in symbols (#142154) Before this change, OmpShared was not always set in shared symbols. Instead, absence of private flags was interpreted as shared DSA. The problem was that symbols with no flags, with only a host association, could also mean "has same DSA as in the enclosing context". Now shared symbols behave the same as private and can be treated the same way. Because of the host association symbols with no flags mentioned above, it was also incorrect to simply test the flags of a given symbol to find out if it was private or shared. The function GetSymbolDSA() was added to fix this. It would be better to avoid the need of these special symbols, but this would require changes to how symbols are collected in lowering. Besides that, some semantic checks need to know if a DSA clause was used or not. To avoid confusing implicit symbols with DSA clauses a new flag was added: OmpExplicit. It is now set for all symbols with explicitly determined data-sharing attributes. With the changes above, AddToContextObjectWithDSA() and the symbol to DSA map could probably be removed and the DSA could be obtained directly from the symbol, but this was not attempted. Some debug messages were also added, with the "omp" DEBUG_TYPE, to make it easier to debug the creation of implicit symbols and to visualize all associations of a given symbol. Fixes #130533 Fixes #140882 | 1 年前 | |
[flang][OpenMP] Semantic checks for DYN_GROUPPRIVATE (#166214) | 9 个月前 | |
[flang][OpenMP] Move two utilities from Semantics to Parser, NFC (#168549) Move GetInnermostExecPart and IsStrictlyStructuredBlock from Semantics/openmp-utils.* to Parser/openmp-utils.*. These two only depend on the AST contents and properties. | 9 个月前 | |
[flang] Consolidate copy-in/copy-out determination in evaluate framework (#151408) New implementation of MayNeedCopy() is used to consolidate copy-in/copy-out checks. IsAssumedShape() and IsAssumedRank() were simplified and are both now in Fortran::semantics workspace. preparePresentUserCallActualArgument() in lowering was modified to use MayNeedCopyInOut() Fixes https://github.com/llvm/llvm-project/issues/138471 | 1 年前 | |
[flang] Require contiguous actual pointer for contiguous dummy pointer (#139298) When the actual argument associated with an explicitly CONTIGUOUS pointer dummy argument is itself a pointer, it must also be contiguous. (A non-pointer actual argument can associate with a CONTIGUOUS pointer dummy argument if it's INTENT(IN), and in that case it's still just a warning if we can't prove at compilation time that the actual is contiguous.) Fixes https://github.com/llvm/llvm-project/issues/138899. | 1 年前 | |
[flang] Fix references to destroyed objects (#111582) ProgramTree instances are created as the value of a local variable in the Pre(const parser::ProgramUnit &) 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 & Solaris). | 1 年前 | |
[flang][OpenMP] Tolerate compiler directives in loop constructs (#169346) PR168884 flagged compiler directives (!dir$ ...) inside OpenMP loop constructs as errors. This caused some customer applications to fail to compile (issue 169229). Downgrade the error to a warning, and gracefully ignore compiler directives when lowering loop constructs to MLIR. Fixes https://github.com/llvm/llvm-project/issues/169229 | 9 个月前 | |
[flang][OpenMP] Emit requirements in module files (#163449) For each program unit, collect the set of requirements from REQUIRES directives in the source, and modules used by the program unit, and add them to the details of the program unit symbol. The requirements in the symbol details as now stored as clauses. Since requirements need to be emitted in the module files as OpenMP directives, this makes the clause emission straightforward via getOpenMPClauseName. Each program unit, including modules, the corresponding symbol will have the transitive closure of the requirements for everything contained or used in that program unit. | 10 个月前 | |
[flang][NFC] Fix build-time warning (#149549) Don't increment the LHS variable of an assignment that also uses that variable on the RHS. | 1 年前 | |
[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 | 6 年前 | |
[flang][NFC] Use parser::Unwrap(Ref) more (#162918) Replace more parse tree references to "thing" and "value()" with usage of the parser::Unwrap<> template function. Add parser::UnwrapRef<> as an alias for DEREF(Unwrap<>()). | 10 个月前 | |
[flang][openmp]Add UserReductionDetails and use in DECLARE REDUCTION (#140066) This adds another puzzle piece for the support of OpenMP DECLARE REDUCTION functionality. This adds support for operators with derived types, as well as declaring multiple different types with the same name or operator. A new detail class for UserReductionDetials is introduced to hold the list of types supported for a given reduction declaration. Tests for parsing and symbol generation added. Declare reduction is still not supported to lowering, it will generate a "Not yet implemented" fatal error. Fixes #141306 Fixes #97241 Fixes #92832 Fixes #66453 --------- Co-authored-by: Mats Petersson <mats.petersson@arm.com> | 1 年前 | |
[flang] Fix crash in UseErrorDetails construction case (#168126) When a derived type has the same name as a generic function, and is use-associated into a scope along with other distinct derived types of the same name, we crash. Don't crash. Fixes https://github.com/llvm/llvm-project/issues/168099. | 9 个月前 | |
[flang] Use module file hashes for more checking and disambiguation (#80354) f18's module files are Fortran with a leading header comment containing the module file format version and a hash of the following contents. This hash is currently used only to protect module files against corruption and truncation. Extend the use of these hashes to catch or avoid some error cases. When one module file depends upon another, note its hash in additional module file header comments. This allows the compiler to detect when the module dependency is on a module file that has been updated. Further, it allows the compiler to find the right module file dependency when the same module file name appears in multiple directories on the module search path. The order in which module files are written, when multiple modules appear in a source file, is such that every dependency is written before the module(s) that depend upon it, so that their hashes are known. A warning is emitted when a module file is not the first hit on the module file search path. Further work is needed to add a compiler option that emits (larger) stand-alone module files that incorporate copies of their dependencies rather than relying on search paths. This will be desirable for application libraries that want to ship only "top-level" module files without needing to include their dependencies. Another future work item would be to admit multiple modules in the same compilation with the same name if they have distinct hashes. | 2 年前 | |
[Flang][OpenMP] Add semantic support for Loop Sequences and OpenMP loop fuse (#161213) 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 <ferran.todacasaban@bsc.es> Co-authored-by: Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> | 9 个月前 | |
[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 | 6 年前 | |
[flang] Allow for equivalent types in non-TBP defined I/O (#158755) Non-extensible derived type -- those with SEQUENCE or BIND(C) -- are allowed as monomorphic "dtv" dummy arguments to defined I/O subroutines. Fortran's type rules admit structural equivalence for these types, and it's possible that I/O might be attempted in a scope using a non-extensible type that's equivalent to a non-type-bound generic interface's specific procedure's "dtv" dummy argument's type, but not defined in the same place. Fixes https://github.com/llvm/llvm-project/issues/158673. This is an IBM Fortran test case that doesn't need to be duplicated in LLVM. | 11 个月前 | |
[flang][OpenACC] Relax COMMON block usage restriction in OpenACC directives (#162659) Unlike OpenMP, OpenACC doesn't require that the COMMON block be defined in the same scope as the directive. | 10 个月前 | |
[flang] Address OpenACC name resolution gaps (#164313) Some OpenACC parsers aren't filling in the "source" data members of parse tree nodes, or not doing so correctly; and some of those nodes are not adding their source data members to the source ranges of the current scope when being visited in name resolution, which causes SemanticsContext::FindScope() to misidentify the current scope in directive resolution when creating contexts. Further, the name resolution for a "use_device" clause isn't walking its subtrees, so some parser::Name nodes are not being resolved to Symbols. Fix these problems, and clean up resolve-directives.cpp a bit, since most Name nodes don't need to have their symbol table pointers updated now. | 10 个月前 | |
[Flang][OpenMP] Update declare mapper lookup via use-module (#167903) | 9 个月前 | |
[flang] Adding NOTIFY specifier in image selector and add notify type checks (#148810) This PR adds support for the NOTIFY specifier in the image selector as described in the 2023 standard, and add checks for the NOTIFY_TYPE type. | 10 个月前 | |
[flang] Use instantiated PDT for structure constructor in default init (#167409) A structure constructor used in (or as) the default component initializer for a PDT derived type component needs to traverse the scope of the right PDT instantiation. Fixes https://github.com/llvm/llvm-project/issues/167337 and fixes https://github.com/llvm/llvm-project/issues/167573. | 9 个月前 | |
[flang][OpenMP] Fix crash on DECLARE REDUCTION in unparse-with-symbols (#157871) | 11 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 6 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 11 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 9 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 6 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 11 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 3 年前 | ||
| 10 个月前 | ||
| 5 年前 | ||
| 11 个月前 | ||
| 10 个月前 | ||
| 11 个月前 | ||
| 6 年前 | ||
| 6 年前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 11 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 1 年前 | ||
| 5 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 10 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 6 年前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 6 年前 | ||
| 11 个月前 | ||
| 10 个月前 | ||
| 10 个月前 | ||
| 9 个月前 | ||
| 10 个月前 | ||
| 9 个月前 | ||
| 11 个月前 |