PPeter Klausler[flang] Strengthen procedure compatibility checking
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[flang] Establish a single source of target information for semantics Create a TargetCharacteristics class to centralize the few items of target specific information that are relevant to semantics. Use the new class for all target queries, including derived type component layout modeling. Future work will initialize this class with target information provided or forwarded by the drivers, and use it to fold layout-dependent intrinsic functions like TRANSFER(). Differential Revision: https://reviews.llvm.org/D129018 Updates: Attempts to work around build issues on Windows. | 4 年前 | |
[flang] Expunge needless semantics::ProcInterface The ProcInterface structure is used only by ProcEntityDetails; it represents what a program might have put in parentheses in a procedure-declaration-stmt, either the name of a procedure interface or a declaration-type-spec. If a procedure entity has an implicit interface, the function result type (if any) can be kept in EntityDetails::type_, which already exists and is currently redundant for ProcEntityDetails symbols. All that is really needed is a nullable Symbol pointer in ProcEntityDetails to point to the procedure's explicit interface, when it has one. Also, catch the case where a procedure has an explicit interface and a program attempts to also give it a type. Differential Revision: https://reviews.llvm.org/D140134 | 3 年前 | |
[flang] Diagnose REPEAT with negative NCOPIES= Emit an error when the NCOPIES= argument to the intrinsic function REPEAT has a negative value. (The current implementation crashes, which isn't informative.) Differential Revision: https://reviews.llvm.org/D143820 | 3 年前 | |
[flang] Strengthen procedure compatibility checking Add more checks to procedure compatibility testing for procedure pointer assignments, actual procedure arguments, &c. Specifically, don't allow corresponding dummy data objects to differ in their use of polymorphism, assumed size arrays, or assumed shape arrays. Differential Revision: https://reviews.llvm.org/D155974 | 2 年前 | |
[flang] Semantics for ISO_C_BINDING's C_LOC() Make __builtin_c_loc() into an intrinsic function and verify the special semantic requirements on its actual arguments. Differential Revision: https://reviews.llvm.org/D149988 | 3 年前 | |
[flang] Fix wording of warning message "division on intrinsic call" should read "division by zero on intrinsic call". Differential Revision: https://reviews.llvm.org/D128394 | 4 年前 | |
[flang] Use naive algorithm for folding complex division when it doesn't over/underflow f18 unconditionally uses a scaling algorithm for complex/complex division that avoids needless overflows and underflows when computing the sum of the squares of the components of the denominator -- but testing has shown some 1 ULP differences relative to the naive calculation due to the extra operations and roundings. So use the scaling algorithm only when the naive calculation actually would overflow or underflow. Differential Revision: https://reviews.llvm.org/D132164 | 3 年前 | |
[flang] Fixed comparison for derived types constants. The two constants should be equal only if their derived types are the same. This fixes regression caused by D150380. Differential Revision: https://reviews.llvm.org/D150634 | 3 年前 | |
[flang] Accommodate unknowable CHARACTER length in evaluate::ArrayConstructor<> The internal representation for array constructors in expressions during semantic analysis needs to be able to accommodate circumstances (e.g. TRIM(), substrings) in which the length of the elements in the array is either unknown or cannot be represented as a context-free integer expression. Differential Revision: https://reviews.llvm.org/D139041 | 3 年前 | |
Flang implementation for COMPILER_VERSION and COMPILER_OPTIONS intrinsics This revision implements the Fortran intrinsic procedures COMPILER_VERSION and COMPILER_OPTIONS from the iso_fortran_env module. To be able to set the COMPILER_OPTIONS string according to the original compiler driver invocation, a string is passed to the frontend driver using the environment variable FLANG_COMPILER_OPTIONS_STRING, for lack of a better mechanism. Fixes #59233 Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D140524 | 3 年前 | |
[flang] Fold DOT_PRODUCT() Implement constant folding of the intrinsic function DOT_PRODUCT(). Differential Revision: https://reviews.llvm.org/D132688 | 3 年前 | |
[flang] Handle empty array references in DATA statements When an array reference in a DATA statement is empty due to an empty vector subscript or a section lower bound being higher than its upper bound with a positive stride (or lower with negative), ensure that isEmpty() is correct afterwards so that such an empty array reference doesn't terminate processing of that DATA statement block. Fixes https://github.com/llvm/llvm-project/issues/63512. Differential Revision: https://reviews.llvm.org/D153799 | 3 年前 | |
[flang] Rewrite "1*j" to "(j)", not "j", when j is a variable Expression folding currently unconditionally rewrites "1*j" to "j", which is wrong when "j" is a variable, as it transforms an expression into a variable and can lead to incorrect associations in contexts like an actual argument or an ASSOCIATE selector. Transform "1*j" to a parenthesized "(j)" when "j" is a variable. Fixes LLVM bug https://github.com/llvm/llvm-project/issues/63259. Differential Revision: https://reviews.llvm.org/D153457 | 3 年前 | |
[flang] Stricter checking of DIM= arguments to LBOUND/UBOUND/SIZE DIM= arguments with constant values can be checked for validity even when other arguments to an intrinsic function can't be folded. Handle errors with assumed-rank arguments as well. Differential Revision: https://reviews.llvm.org/D155964 | 2 年前 | |
[flang] Don't warn about a NaN argument to ISNAN() Don't emit a warning when a compile-time constant argument to ISNAN() or IEEE_IS_NAN() is a NaN. Differential Revision: https://reviews.llvm.org/D154377 | 3 年前 | |
[flang] Warn about overflow after folding HYPOT The code that folds the intrinsic function HYPOT was neglecting to warn the programmer about overflow when it occurs. Differential Revision: https://reviews.llvm.org/D154371 | 3 年前 | |
[flang] Clarify CheckReductionDIM() This utility routine in constant folding should return false when a DIM= actual argument to a reduction intrinsic function has a value that prevents folding, and true when folding can proceed. The implementation was returning true in cases where a DIM= argument was present but not constant. Clarify the code and add commentary: a true result means that there is no DIM= actual argument present, or that a DIM= argument exists, is constant, and has a value that is in range. Differential Revision: https://reviews.llvm.org/D131101 | 3 年前 | |
[flang] Fix overflow detection for folding SUM/PRODUCT The overflow detection code in the templates that fold SUM and PRODUCT was checking for overflow before performing the reduction, not after. Fix and add tests. Differential Revision: https://reviews.llvm.org/D154374 | 3 年前 | |
[flang] Fix crash in folding TRANSFER() with MOLD=substring When a substring appears as the MOLD= argument to TRANSFER(), it's possible for the compiler to assert if it can't figure out a constant length for the substring. Fix. Differential Revision: https://reviews.llvm.org/D145740 | 3 年前 | |
[flang] CUDA Fortran - part 4/5: definability and characteristics Extend the definability and procedure characteristics checking infrastructure in semantics to check for context-dependent CUDA object definability violations and problems with CUDA attribute incompatibility in procedure interfaces. Depends on https://reviews.llvm.org/D150159, https://reviews.llvm.org/D150161, & https://reviews.llvm.org/D150162. Differential Revision: https://reviews.llvm.org/D150163 | 3 年前 | |
[flang] Improve warning message When a floating-point exception occurs while folding an exponentiation operation with a host library at compilation time, the warning message should not say that it was an "intrinsic function". Differential Revision: https://reviews.llvm.org/D137030 | 3 年前 | |
[flang] Fix/work around warnings from GCC 11 Apply part of a pending patch for GCC 11 warnings, and rework a piece of code, to dodge warnings on flag from GCC 11 build bots exposed by a recent patch. Applying without review to get bots working again; changes also tested against GCC 9.3.0. | 4 年前 | |
[flang] Fix crash in folding TRANSFER() with MOLD=substring When a substring appears as the MOLD= argument to TRANSFER(), it's possible for the compiler to assert if it can't figure out a constant length for the substring. Fix. Differential Revision: https://reviews.llvm.org/D145740 | 3 年前 | |
[flang] Establish a single source of target information for semantics Create a TargetCharacteristics class to centralize the few items of target specific information that are relevant to semantics. Use the new class for all target queries, including derived type component layout modeling. Future work will initialize this class with target information provided or forwarded by the drivers, and use it to fold layout-dependent intrinsic functions like TRANSFER(). Differential Revision: https://reviews.llvm.org/D129018 Updates: Attempts to work around build issues on Windows. | 4 年前 | |
[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 年前 | |
[NFC] fix typo funciton -> function credits to @jmagee | 3 年前 | |
[flang] Accept an assumed-rank array as operand of ASSOCIATED() The ASSOCIATED() intrinsic was mistakenly defined in the intrinsic function table as requiring operands of known rank, which unintentionally prevented assumed-rank dummy arguments from being tested. Fixes llvm-test-suite/Fortran/gfortran/regression/pr88932.f90. Differential Revision: https://reviews.llvm.org/D155498 | 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] Fix SPACING() of very small values SPACING() must return TINY() for zero arguments (which we do) and also for subnormal values smaller than TINY() in absolute value, which we get wrong. Fix folding and the runtime. Differential Revision: https://reviews.llvm.org/D151272 | 3 年前 | |
[flang] Fix crash in shape analysis of PACK() A CHECK() was firing when a call to the PACK intrinsic does not have a VECTOR= argument and at least one dimension of the shape of the ARRAY= argument could not be determined. The CHECK was inappropriate, since this can of course happen, such as when that argument is the result of the SPREAD() intrinsic with non-constant DIM= or NCOPIES= arguments. Replace with an if() statement. Differential Revision: https://reviews.llvm.org/D152212 | 3 年前 | |
[flang] Establish a single source of target information for semantics Create a TargetCharacteristics class to centralize the few items of target specific information that are relevant to semantics. Use the new class for all target queries, including derived type component layout modeling. Future work will initialize this class with target information provided or forwarded by the drivers, and use it to fold layout-dependent intrinsic functions like TRANSFER(). Differential Revision: https://reviews.llvm.org/D129018 Updates: Attempts to work around build issues on Windows. | 4 年前 | |
[flang] Add PowerPC vec_add, vec_and, vec_mul, vec_sub and vec_xor intrinsics Differential Revision: https://reviews.llvm.org/D151857 | 3 年前 | |
[Flang][OpenMP] Lower allocatable or pointer in private clause This patch lowers allocatables and pointers named in "private" OpenMP clause. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D148570 | 3 年前 | |
[flang] Compare component types In AreSameComponent() The subroutine AreSameComponent() of the predicate AreSameDerivedType() had a TODO about checking component types that needed completion in order to properly detect that two specific procedures of a generic are distinguishable in the llvm-test-suite/Fortran/gfortran/regression test import7.f90. Differential Revision: https://reviews.llvm.org/D155962 | 2 年前 | |
[flang] Catch character length errors in pointer associations When character lengths are known at compilation time, report an error when a data target with a known length does not match the explicit length of a pointer that is being associated with it; see 10.2.2.3 paragraph 5. Differential Revision: https://reviews.llvm.org/D142755 | 3 年前 |