-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang] Add runtime interface for NUM_IMAGES #1076
base: fir-dev
Are you sure you want to change the base?
Commits on Jul 22, 2021
-
Merge branch 'fir-dev' of https://github.com/flang-compiler/f18-llvm-…
…project into fir-dev Getting ready to merge changes for the CSHIFT intrinsic.
Configuration menu - View commit details
-
Copy full SHA for c121e87 - Browse repository at this point
Copy the full SHA c121e87View commit details -
[flang] Implement the lowering portion of the CSHIFT intrinsic
This change implements the lowering runtime portion of the CSHIFT intrinsic. The implementation of the runtime was done in revision D106292.
Configuration menu - View commit details
-
Copy full SHA for ca8245a - Browse repository at this point
Copy the full SHA ca8245aView commit details -
Merge pull request flang-compiler#937 from flang-compiler/ps-cshift
[flang] Implement the lowering portion of the CSHIFT intrinsic
Configuration menu - View commit details
-
Copy full SHA for 23d2f3e - Browse repository at this point
Copy the full SHA 23d2f3eView commit details -
Merge pull request flang-compiler#914 from banach-space/andrzej/dot_p…
…roduct Add lowering for the DOT_PRODUCT intrinsic I confirmed that it builds and runs without issue (regression tests pass and an end-to-end dot product test runs correctly too). Thanks @banach-space !
Configuration menu - View commit details
-
Copy full SHA for be011ea - Browse repository at this point
Copy the full SHA be011eaView commit details -
Lowering for the Matmul Intrinsic
Initial implementation with assumption that rank will be always 2
Configuration menu - View commit details
-
Copy full SHA for 019b009 - Browse repository at this point
Copy the full SHA 019b009View commit details -
[flang] Remove an unneeded call to createBox
In processing the UNPACK intrinsic, my implementation had an unneeded extra call to createBox(). This change removes it.
Configuration menu - View commit details
-
Copy full SHA for 0c69f27 - Browse repository at this point
Copy the full SHA 0c69f27View commit details -
Fixes to address TODOs and review comments
-> Handle case where rank of one the matrices is 1. -> Add test for the above case with logical type. -> Remove return value from the matmul call.
Configuration menu - View commit details
-
Copy full SHA for dbe480d - Browse repository at this point
Copy the full SHA dbe480dView commit details -
[flang] Implement the runtime portion of the CSHIFT intrinsic
This change fixes a bug in the runtime portion of the CSHIFT intrinsic that happens when the value of the SHIFT argument is negative. Differential Revision: https://reviews.llvm.org/D106292
Configuration menu - View commit details
-
Copy full SHA for e80fbf3 - Browse repository at this point
Copy the full SHA e80fbf3View commit details -
Merge pull request flang-compiler#940 from flang-compiler/ps-fix-unpack
[flang] Remove an unneeded call to createBox
Configuration menu - View commit details
-
Copy full SHA for 651a3be - Browse repository at this point
Copy the full SHA 651a3beView commit details
Commits on Jul 23, 2021
-
Merge pull request flang-compiler#938 from flang-compiler/jpr-host-as…
…soc-review-comments [NFC] address comments from flang-compiler#907
Configuration menu - View commit details
-
Copy full SHA for 90cb2d6 - Browse repository at this point
Copy the full SHA 90cb2d6View commit details -
Lower default initialization of local and dummy entities
When instantiating variables, identify the ones that must be default initialized at runtime (locals and intent(out) dummies). Call the default initialization runtime routine to perform the initialization. Global variables that have no explicit initialization and have a default initialization are left TODO. The runtime cannot be used for them, the fir.global generation will need to be updated for these variables (it was generating an undefined undefined until now). For now, simply catch and add a hard TODO for these cases. For information, it is firing 13 times in NAG F95 tests. Runtime interface for finalization is added, but nothing is done with it yet (Final procedures are not F95).
Configuration menu - View commit details
-
Copy full SHA for 896c6b3 - Browse repository at this point
Copy the full SHA 896c6b3View commit details -
Merge pull request flang-compiler#939 from flang-compiler/jpr-derived…
…-type-init-2 Lower default initialization of local and dummy entities
Configuration menu - View commit details
-
Copy full SHA for 776a3da - Browse repository at this point
Copy the full SHA 776a3daView commit details -
Merge pull request flang-compiler#791 from Leporacanthicus/modifiers
[OpenMP][Flang]Add support for modifiers monotonic and non-monotonic
Configuration menu - View commit details
-
Copy full SHA for 18b0621 - Browse repository at this point
Copy the full SHA 18b0621View commit details -
Fix fir.alloca codegen for array with dynamic type parameters
Also insert casts in fir.array_coor op (error revealed by the first fix).
Configuration menu - View commit details
-
Copy full SHA for c424f04 - Browse repository at this point
Copy the full SHA c424f04View commit details
Commits on Jul 26, 2021
-
Merge pull request flang-compiler#943 from flang-compiler/jpr-alloca-…
…issue Fix fir.alloca codegen for array with dynamic type parameters
Configuration menu - View commit details
-
Copy full SHA for 8abd290 - Browse repository at this point
Copy the full SHA 8abd290View commit details
Commits on Jul 27, 2021
-
It does not make sense to embox a box. Instead we can convert the box's signature with a fir.convert, which is idempotent on the boxed value.
Configuration menu - View commit details
-
Copy full SHA for b5bb1ef - Browse repository at this point
Copy the full SHA b5bb1efView commit details
Commits on Jul 28, 2021
-
[flang] Disallow BOZ literal constants as arguments of implicit inter…
…faces Since BOZ literal arguments are typeless, we cannot know how to pass them as actual arguments to procedures with implicit interfaces. This change avoids the problem by emitting an error message in such situations. This change stemmed from the following issue -- flang-compiler#794 Differential Revision: https://reviews.llvm.org/D106831
Configuration menu - View commit details
-
Copy full SHA for 59e67a2 - Browse repository at this point
Copy the full SHA 59e67a2View commit details -
[flang] Disallow BOZ literal constants as output list items
According to C7109, "A boz-literal-constant shall appear only as a data-stmt-constant in a DATA statement, or where explicitly allowed in 16.9 as an actual argument of an intrinsic procedure." This change enforces that constraint for output list items. I also added a general interface to determine if an expression is a BOZ literal constant and changed all of the places I could find where it could be used. I also added a test. This change stemmed from the following issue -- https://gitlab-master.nvidia.com/fortran/f18-stage/issues/108 Differential Revision: https://reviews.llvm.org/D106893
Configuration menu - View commit details
-
Copy full SHA for f3a7726 - Browse repository at this point
Copy the full SHA f3a7726View commit details -
[flang] runtime: fix problems with I/O around EOF & delimited characters
When a WRITE overwrites an endfile record, we need to forget that there was an endfile record. When doing a BACKSPACE after an explicit ENDFILE statement, the position afterwards must be upon the endfile record. Attempts to join list-directed delimited character input across record boundaries was due to a bad reading of the standard and has been deleted, now that the requirements are better understood. This problem would cause a read attempt past EOF if a delimited character input value was at the end of a record. It turns out that delimited list-directed (and NAMELIST) character output is required to emit contiguous doubled instances of the delimiter character when it appears in the output value. When fixed-size records are being emitted, as is the case with internal output, this is not possible when the problematic character falls on the last position of a record. No two other Fortran compilers do the same thing in this situation so there is no good precedent to follow. Because it seems least wrong, with this patch we now emit one copy of the delimiter as the last character of the current record and another as the first character of the next record. (The second-least-wrong alternative might be to flag a runtime error, but that seems harsh since it's not an explicit error in the standard, and the output may not have to be usable later as input anyway.) Consequently, the output is not suitable for use as list-directed or NAMELIST input. If a later standard were to clarify this case, this behavior will of course change as needed to conform. Differential Revision: https://reviews.llvm.org/D106695
Configuration menu - View commit details
-
Copy full SHA for 4a3d98a - Browse repository at this point
Copy the full SHA 4a3d98aView commit details -
[flang] Runtime: Reset list-directed input state for each NAMELIST item
NAMELIST I/O formatting uses the runtime infrastructure for list-directed I/O. List-directed input processing has same state that requires reinitialization for each successive NAMELIST input item. This patch fixes bugs with "null" items and repetition counts on NAMELIST input items after the first in the group. Differential Revision: https://reviews.llvm.org/D106694
Configuration menu - View commit details
-
Copy full SHA for 2f1c330 - Browse repository at this point
Copy the full SHA 2f1c330View commit details -
Merge pull request flang-compiler#947 from vdonaldson/vkd2
cherry pick runtime I/O fixes for namelist array input, backspace, rewind
Configuration menu - View commit details
-
Copy full SHA for 9065951 - Browse repository at this point
Copy the full SHA 9065951View commit details
Commits on Jul 29, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b209722 - Browse repository at this point
Copy the full SHA b209722View commit details -
Merge pull request flang-compiler#931 from kiranchandramohan/matmul
Lowering for the Matmul Intrinsic
Configuration menu - View commit details
-
Copy full SHA for cea71dc - Browse repository at this point
Copy the full SHA cea71dcView commit details -
[flang][nfc] Move tests from intrinsic-procedures.f90 to dedicated files
All tests from flang/test/Lower/intrinsic-procedures.f90 are moved to dedicated files (with the exception of `lge`, `lgt`, `lle` and `llt`). With this change, every filename clearly defines which intrinsic procedure is being tested. After the initial split, we discovered that some tests were invalid (e.g. `! CHECK` was used instead of `! CHECK:`). These tests are now fixed. Some tests are additionally hardened (e.g. some `CHECK-DAG` directives was replaced with `CHECK`). Some tests are updated with checks generated with mlir/utils/generate-test-checks.py. In other words, this patch _moves_ and _reformats_ the tests. The documentation is updated accordingly (with some extra clarifications, as suggested by the reviewers). Please see the following PRs for a complete discussion: * flang-compiler#927 * flang-compiler#914
Configuration menu - View commit details
-
Copy full SHA for e4e9534 - Browse repository at this point
Copy the full SHA e4e9534View commit details
Commits on Jul 30, 2021
-
Merge pull request flang-compiler#927 from banach-space/andrzej/separ…
…ate_tests [flang][nfc] Move tests from intrinsic-procedures.f90 to dedicated files
Configuration menu - View commit details
-
Copy full SHA for 3cedc9c - Browse repository at this point
Copy the full SHA 3cedc9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ba7afe - Browse repository at this point
Copy the full SHA 9ba7afeView commit details -
Merge pull request flang-compiler#955 from schweitzpgi/ch-verify
Fix the verify test.
Configuration menu - View commit details
-
Copy full SHA for 4b9d243 - Browse repository at this point
Copy the full SHA 4b9d243View commit details -
Delete code that was redundantly removing the elided extents before t…
…he builder elided those extents. Fixes flang-compiler#942.
Configuration menu - View commit details
-
Copy full SHA for d3c32a4 - Browse repository at this point
Copy the full SHA d3c32a4View commit details -
Merge pull request flang-compiler#956 from flang-compiler/ch-ch5egs
Delete code that was redundantly removing the elided extents before t…
Configuration menu - View commit details
-
Copy full SHA for b4e472a - Browse repository at this point
Copy the full SHA b4e472aView commit details -
Cherry pick from llvm-main, the runtime fixes for MAXLOC runtime erro…
…r with a scalar result. See the following Phabricator review for more information: https://reviews.llvm.org/D106820
Configuration menu - View commit details
-
Copy full SHA for 55e391e - Browse repository at this point
Copy the full SHA 55e391eView commit details -
Merge pull request flang-compiler#957 from flang-compiler/ml-fix-loc
Cherry pick from llvm-main, the runtime error fixes for MAXLOC
Configuration menu - View commit details
-
Copy full SHA for 68cb255 - Browse repository at this point
Copy the full SHA 68cb255View commit details
Commits on Aug 3, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3e75a5f - Browse repository at this point
Copy the full SHA 3e75a5fView commit details -
Lowering FORALL statement and FORALL construct with scalar, array, an…
…d WHERE construct assignments. This patch includes changes to the bridge, array expression lowering, the array value copy transformation, some FIR ops, and tests. Code generation was tested end to end with the NAG F95 tests. The implementation raises (nested) FORALL constructs (statements) into array expression form. This means that array expressions and FORALL constructs will be presented to the optimizer with the same structure. There are some notable differences between FORALLs and array expressions that required extending the array framework. - An array expression is isomorphic between the iteration space and the access expressions. FORALL need not be. - An array expression is limited by the standard to operate upon exactly one ranked component in a designator. A FORALL assignment is, generally, not limited in this way. - WHERE constructs contain array expressions both as masks and in the construct blocks. FORALL constructs may contain scalar assignments, array assignments, other FORALL constructs, and WHERE constructs. - WHERE constructs have a cascading disjunctional conditional execution structure over entire array assignments on an elemental basis. The if-else cascade is evaluated in program order. FORALL masks have a conjunctional conditional structure and do not, generally, have an elemental application but are a function of the user-defined iteration space. These two execution structures can be mixed with the FORALL case having priority. Despite these differences, these Fortran constructs share the "copy-in copy-out" execution model. See the standard for more information. After the array copy value transformation runs, FIR code will have the same fundamental structure for array assignments, WHERE constructs, FORALL constructs, FORALL/WHERE constructs, and DO CONCURRENT loops. (That is, the nominal "parallel" execution forms.) This patch does not address FORALL and assignment to POINTERs/ALLOCATABLEs. It also does not fix bugs in arrays of CHARACTER or derived types. + Respond to review comments.
Configuration menu - View commit details
-
Copy full SHA for 79dd7cc - Browse repository at this point
Copy the full SHA 79dd7ccView commit details -
Merge pull request flang-compiler#954 from schweitzpgi/ch-forall
Lowering FORALL statement and FORALL construct with scalar, array, an…
Configuration menu - View commit details
-
Copy full SHA for 4a718fa - Browse repository at this point
Copy the full SHA 4a718faView commit details
Commits on Aug 4, 2021
-
[flang][msvc] Fix external-io unittest.
Fix the external-io unittest under Windows. In particular, fixes the following issues: 1. When creating a temporary file, open it with read+write permissions using the _O_RDWR flag. _S_IREAD and _S_IWRITE are for the file permissions of the created file. 2. _chsize returns 0 on success (just like ftruncate). 3. To set a std::optional, use its assign-operator overload instead of getting a reference to its value and overwrite that. The latter is invalid if the std::optional has no value, and is caught by msvc's debug STL. The non-GTest unittest is currently not executed under Windows because of the added .exe extension to the output file: external-io.text.exe. llvm-lit skips the file because .exe is not in the lists of test suffixes (.test is). D105315 is going to change that by converting it to a GTest-test. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D106726
Configuration menu - View commit details
-
Copy full SHA for f73a32e - Browse repository at this point
Copy the full SHA f73a32eView commit details -
[flang] Disallow BOZ literal constants as arguments of implicit inter…
…faces Since BOZ literal arguments are typeless, we cannot know how to pass them as actual arguments to procedures with implicit interfaces. This change avoids the problem by emitting an error message in such situations. This change stemmed from the following issue -- flang-compiler#794 Differential Revision: https://reviews.llvm.org/D106831
Configuration menu - View commit details
-
Copy full SHA for 6f129d1 - Browse repository at this point
Copy the full SHA 6f129d1View commit details -
[flang] Fix thinko in CPU_TIME test
We used to test that end > start, but it can well be >= (otherwise the loop doesn't make sense).
Configuration menu - View commit details
-
Copy full SHA for 5c741a0 - Browse repository at this point
Copy the full SHA 5c741a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d519a1 - Browse repository at this point
Copy the full SHA 1d519a1View commit details -
[flang] Disallow BOZ literal constants as output list items
According to C7109, "A boz-literal-constant shall appear only as a data-stmt-constant in a DATA statement, or where explicitly allowed in 16.9 as an actual argument of an intrinsic procedure." This change enforces that constraint for output list items. I also added a general interface to determine if an expression is a BOZ literal constant and changed all of the places I could find where it could be used. I also added a test. This change stemmed from the following issue -- https://gitlab-master.nvidia.com/fortran/f18-stage/issues/108 Differential Revision: https://reviews.llvm.org/D106893
Configuration menu - View commit details
-
Copy full SHA for 06c5237 - Browse repository at this point
Copy the full SHA 06c5237View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c54696 - Browse repository at this point
Copy the full SHA 7c54696View commit details -
Fix runtime internal error with certain intrinsics that can take a sc…
…alar result descriptor (e.g., maxloc, minloc, maxval, minval, all, any, count, parity, findloc, etc.) Also add a scalar case for these intrinsic unit tests. Differential Revision: https://reviews.llvm.org/D106820
Configuration menu - View commit details
-
Copy full SHA for f60bea0 - Browse repository at this point
Copy the full SHA f60bea0View commit details -
Fix unit test checks for the scalar cases of all/any intrinsics. I
accidentally used int64 when they should have been int32. This lead to a Windows build unit test error (Linux did not catch the problem). Differential Revision: https://reviews.llvm.org/D107107
Configuration menu - View commit details
-
Copy full SHA for a43745a - Browse repository at this point
Copy the full SHA a43745aView commit details -
Fix scalar unit tests for all, any, maxloc, etc. that caused the ARM …
…build to fail due to warnings as errors. Note that I could not reproduce the problem locally, but based on the messages, I think this change will fix the errors. Differential Revision: https://reviews.llvm.org/D107120
Configuration menu - View commit details
-
Copy full SHA for 79188b8 - Browse repository at this point
Copy the full SHA 79188b8View commit details -
[flang] Fix IsSimplyContiguous() for the case of a pointer component
The result expression for the analysis of a Component is not (longer) valid in the expression traversal framework used by IsSimplyContiguousHelper now that it has a tri-state result. Fix so that any result of analyzing the component symbol is required to be true, not just present. Differential Revision: https://reviews.llvm.org/D106693
Configuration menu - View commit details
-
Copy full SHA for 7f63ddc - Browse repository at this point
Copy the full SHA 7f63ddcView commit details -
[flang] Symbol representation for dummy SubprogramDetails
Dummy procedures can be defined as subprograms with explicit interfaces, e.g. subroutine subr(dummy) interface subroutine dummy(x) real :: x end subroutine end interface ! ... end subroutine but the symbol table had no means of marking such symbols as dummy arguments, so predicates like IsDummy(dummy) would fail. Add an isDummy_ flag to SubprogramNameDetails, analogous to the corresponding flag in EntityDetails, and set/test it as needed. Differential Revision: https://reviews.llvm.org/D106697
Configuration menu - View commit details
-
Copy full SHA for 12201e2 - Browse repository at this point
Copy the full SHA 12201e2View commit details -
[flang] Add missing FileSystem.h
This file was previously included transitively via `mlir/Transforms/Passes.h`, but the include has been removed from that file. Differential Revision: https://reviews.llvm.org/D107455
Configuration menu - View commit details
-
Copy full SHA for 9b45d7a - Browse repository at this point
Copy the full SHA 9b45d7aView commit details -
Add fir lowering for PACK intrinsic Replace unneeded CHECK-DAG with CHECK in pack regression test.
Configuration menu - View commit details
-
Copy full SHA for c1d52b0 - Browse repository at this point
Copy the full SHA c1d52b0View commit details -
Merge pull request flang-compiler#962 from flang-compiler/ml-pack
Add fir lowering for PACK intrinsic
Configuration menu - View commit details
-
Copy full SHA for be5a626 - Browse repository at this point
Copy the full SHA be5a626View commit details
Commits on Aug 5, 2021
-
Merge pull request flang-compiler#964 from flang-compiler/jpr-cherry-…
…pick-all-fe-changes Cherry pick all changes in flang folder since last cherry-picking
Configuration menu - View commit details
-
Copy full SHA for d31b6da - Browse repository at this point
Copy the full SHA d31b6daView commit details -
zero size common blocks (flang-compiler#965)
Common blocks without explicit initialization are initialized with an mlir::VectorType initializer, which must have a strictly positive size: real nada(1:0) common /empty/ nada fir.global common @_QBempty(dense<0> : vector<0xi8>) : !fir.array<0xi8> error: vector types must have positive constant sizes An alternative is to instead initialize with a fir::SequenceType, but that leads to a tco error: fir.global common @_QBempty : !fir.array<0xi8> { %0 = fir.undefined !fir.array<0xi8> fir.has_value %0 : !fir.array<0xi8> } 'common' global must have a zero initializer! [0 x i8]* @_QBempty error: could not emit LLVM-IR Work around these issues by forcing zero size common blocks to have one byte: fir.global common @_QBempty(dense<0> : vector<1xi8>) : !fir.array<1xi8> Note: There is an additional front end bug where most zero size arrays are incorrectly given non-zero size. This additional bug needs to be addressed to allow correct compilation of common blocks containing those arrays.
Configuration menu - View commit details
-
Copy full SHA for 380e00d - Browse repository at this point
Copy the full SHA 380e00dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ac8682 - Browse repository at this point
Copy the full SHA 4ac8682View commit details -
Lower default initialization of global variables
Add a genDefaultInitializerValue method in variable lowering that generates the body of the global op that must be default initialized. Default initialized defers from explicit initialization because all the component may not have an initialization, therefore the front-end is not providing a top level ev::Expr that can be lowered for the derived type. Hence, lowering visits each components and lower any default initialization if present or leave the component undefined otherwise. genDefaultInitializerValue is recursive because component without a default initialization value can be of a derived type whose component have default initialization. Default initialization also applies to variable in equivalences. The standard is not 100% clear about the possibility of mixing overlapping default and explicit initialization. This PR support full overlaps (the default initialization is completely overridden by explicit initialization of other equivalence members), no overlap (the default initialization is fully apply to the equivalence storage). It however does not support mixing pieces of explicit initialization from other equivalence members over part of the default initialization (the situation is detected and a TODO emitted). Not all compilers support this last case (nagfor, ifort and nvfortran support this, gfortran refuses it, and xlf silently ignores the explicit initialization).
Configuration menu - View commit details
-
Copy full SHA for 73dc364 - Browse repository at this point
Copy the full SHA 73dc364View commit details -
Merge pull request flang-compiler#963 from flang-compiler/jpr-derived…
…-type-init-global-4 Lower default initialization of module and saved variables
Configuration menu - View commit details
-
Copy full SHA for 7184dd0 - Browse repository at this point
Copy the full SHA 7184dd0View commit details
Commits on Aug 6, 2021
-
[flang] Implement lowering for the SIZE intrinsic
Assumed-rank entities are not yet handled. No runtime call was needed. Also, all situations where the DIM argument is not present are handled by the front end converting calls to SIZE with values of the DIM argument that correspond to the rank of the ARRAY argument. Thus, if ARRAY has rank 1, a call to "SIZE(ARRAY)" is changed to "SIZE(ARRAY, 1)". If ARRAY has rank 2, the call is changed to the expression "SIZE(ARRAY, 1) * SIZE(ARRAY, 2)". Thus, the only thing I needed to do was convert the value of the DIM argument to be 1-based and make the appropriate call to BoxDimsOp. I also added a test.
Configuration menu - View commit details
-
Copy full SHA for 1b76fae - Browse repository at this point
Copy the full SHA 1b76faeView commit details -
Merge pull request flang-compiler#966 from flang-compiler/ps-size
[flang] Implement lowering for the SIZE intrinsic
Configuration menu - View commit details
-
Copy full SHA for 183bc96 - Browse repository at this point
Copy the full SHA 183bc96View commit details
Commits on Aug 9, 2021
-
Ensure scalar args are lowered to ref if needed in elemental calls
Scalars were args were lowered to value in elemental calls where they needed to be passed by reference. Lower scalar to a reference when the elemental function takes a reference. In case the elemental arg is passed by value, lower the arg by value and store the value in a temp that is passed to the call. This fixes the error "'llvm.call' op operand type mismatch for operand 1" in nag_f08_95 l7.f90 (similar error remains coming from non elemental context in some other tests) It is not 100% clear to me that the by address case is OK from an aliasing point of view (e.g. in `i = foo(j, i(10))` the current passing the raw address of i(10) at every iteration).
Configuration menu - View commit details
-
Copy full SHA for b546ab9 - Browse repository at this point
Copy the full SHA b546ab9View commit details
Commits on Aug 10, 2021
-
[flang] Add default implementation for SYSTEM_CLOCK
Add an implementation for the runtime functions related to SYSTEM_CLOCK. As with CPU_TIME, this is based on std::clock(), which should be available everywhere, but it is highly recommended to add platform-specific implementations for systems where std::clock() behaves poorly (e.g. POSIX). The documentation for std::clock() doesn't specify a maximum value and in fact wrap around behaviour is non-conforming. Therefore, this implementation of SYSTEM_CLOCK is not guaranteed to wrap around either, and after std::clock reaches its maximum value we will likely just return failure rather than wrap around. If this happens often on your system, please add a new platform-specific implementation. We define COUNT_MAX as either the maximum value that can be stored in a std::clock_t or in a 64-bit integer (whichever is smaller), and COUNT_RATE as CLOCKS_PER_SEC. For POSIX systems, the value of CLOCKS_PER_SEC is hardcoded to 10^6 and irrelevant for the values returned by std::clock. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D105969
Configuration menu - View commit details
-
Copy full SHA for c4454f0 - Browse repository at this point
Copy the full SHA c4454f0View commit details -
[flang] Add POSIX implementation for SYSTEM_CLOCK
This is very similar to CPU_TIME, except that we return nanoseconds rather than seconds. This means we're potentially dealing with rather large numbers, so we'll have to wrap around to avoid overflows. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D105970
Configuration menu - View commit details
-
Copy full SHA for 2534d53 - Browse repository at this point
Copy the full SHA 2534d53View commit details -
Merge pull request flang-compiler#971 from flang-compiler/jpr-fix-ele…
…mental-call-mismatch Ensure scalar args are lowered to ref if needed in elemental calls
Configuration menu - View commit details
-
Copy full SHA for bbe47c2 - Browse repository at this point
Copy the full SHA bbe47c2View commit details -
Implement FORALL with allocatables.
This also includes some renaming to keep implicit and explicit iteration spaces more clearly distinct.
Configuration menu - View commit details
-
Copy full SHA for a8082ef - Browse repository at this point
Copy the full SHA a8082efView commit details
Commits on Aug 11, 2021
-
Merge pull request flang-compiler#977 from schweitzpgi/ch-allocforall
Implement FORALL with allocatables.
Configuration menu - View commit details
-
Copy full SHA for 9673be2 - Browse repository at this point
Copy the full SHA 9673be2View commit details -
Support fir.box in genRecordAssignment
Fixes nag_f95_syntax 210a211 issue. The ExtendedValue in genRecordAssignment can very well be fir::BoxValue. Handle this case correctly.
Configuration menu - View commit details
-
Copy full SHA for a644a19 - Browse repository at this point
Copy the full SHA a644a19View commit details -
Merge pull request flang-compiler#973 from flang-compiler/jp-cherry-p…
…ick-system-clock Cherry pick system clock implementation patch from phabricator
Configuration menu - View commit details
-
Copy full SHA for e793107 - Browse repository at this point
Copy the full SHA e793107View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45090cc - Browse repository at this point
Copy the full SHA 45090ccView commit details -
[flang] Fix the extent calculation when upper bounds are less than lo…
…wer bounds When the upper bound is less than the lower bound, the extent is zero. This is specified in section 8.5.8.2, paragraph 3. Note that similar problems exist in the lowering code. This change only fixes the problem for the front end. I also added a test. Differential Revision: https://reviews.llvm.org/D107832
Configuration menu - View commit details
-
Copy full SHA for f51ffbe - Browse repository at this point
Copy the full SHA f51ffbeView commit details -
Fixes assertion 'idx < size()' in tests.
The front-end shape analysis can't be used in all cases.
Configuration menu - View commit details
-
Copy full SHA for 88a4b61 - Browse repository at this point
Copy the full SHA 88a4b61View commit details -
Merge pull request flang-compiler#981 from schweitzpgi/ch-bug3
Fixes assertion 'idx < size()' in tests.
Configuration menu - View commit details
-
Copy full SHA for e6dad13 - Browse repository at this point
Copy the full SHA e6dad13View commit details -
- added basic implementation for lowering of the SCALE intrinsic - added tests for lowering of SCALE intrinsic Address review comments: - change TODO to fir::emitFatalError - simplify creation of arguments list using Fortran::lower::createArguments - clang-format files
Configuration menu - View commit details
-
Copy full SHA for 91e1b94 - Browse repository at this point
Copy the full SHA 91e1b94View commit details -
[flang] Fix the lowering test for constant-folded extent calculations
With the latest change to the front end, extent calculations are constant folded which affects the expressions that get lowered. This means that the tests that contain the constant folded expressions need to be updated.
Configuration menu - View commit details
-
Copy full SHA for 8b0431e - Browse repository at this point
Copy the full SHA 8b0431eView commit details -
Merge pull request flang-compiler#982 from flang-compiler/ps-cherry-p…
…ick-extents Ps cherry pick extents
Configuration menu - View commit details
-
Copy full SHA for 8339dbd - Browse repository at this point
Copy the full SHA 8339dbdView commit details -
Merge pull request flang-compiler#980 from flang-compiler/aperry-scale
SCALE instrinsic lowering
Configuration menu - View commit details
-
Copy full SHA for 717a4b7 - Browse repository at this point
Copy the full SHA 717a4b7View commit details
Commits on Aug 12, 2021
-
Configuration menu - View commit details
-
Copy full SHA for fb01a71 - Browse repository at this point
Copy the full SHA fb01a71View commit details -
Merge pull request flang-compiler#979 from flang-compiler/jpr-fix-210…
…a211 Support fir.box in genRecordAssignment
Configuration menu - View commit details
-
Copy full SHA for 9f201b9 - Browse repository at this point
Copy the full SHA 9f201b9View commit details -
[flang] Always create HostAssocDetails for host object symbols with U…
…seDetails https://reviews.llvm.org/D105464 did not correctly cover the case where the symbol from the host procedure is use associated. Outside of the mis-parsed ArrayRef case, flang was also creating a symbol with HostAssociated details inside the internal procedure (pointing to the use associated symbol in the host). That is what lowering expects. This patch ensures the same logic is applied in the mis-parsed array-ref name resolution (and the pointer target name resolution). Differential Revision: https://reviews.llvm.org/D107759
Configuration menu - View commit details
-
Copy full SHA for 9972f6c - Browse repository at this point
Copy the full SHA 9972f6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 52050ce - Browse repository at this point
Copy the full SHA 52050ceView commit details -
Instantiate module variables in internal procedure of module procedures
When an internal procedure is defined inside a module procedure, it may access the module variables. These access are not materialized by associated symbols in the internal procedure scope, so lowering must instantiate all the module variables before lowering the internal procedure so that any reference to the module symbols can be resolved. Also update the case where the internal procedure is not in a module procedure but simply in a procedure that uses module variables. This case compiled and worked, but the module variable was passed via the host tuple when it can simply be instantiated directly from the module address inside the internal procedure.
Configuration menu - View commit details
-
Copy full SHA for d207a63 - Browse repository at this point
Copy the full SHA d207a63View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57bfb63 - Browse repository at this point
Copy the full SHA 57bfb63View commit details -
Delete intrinsic-procedures.f90
I found this file does not exist anymore in upstream fir-dev branch, so I will remove this file.
Configuration menu - View commit details
-
Copy full SHA for af192d1 - Browse repository at this point
Copy the full SHA af192d1View commit details -
Merge pull request flang-compiler#974 from flang-compiler/jpr-fix-941-2
Ensure used module variables are mapped when lowering internal procedures.
Configuration menu - View commit details
-
Copy full SHA for 40edb60 - Browse repository at this point
Copy the full SHA 40edb60View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf34e12 - Browse repository at this point
Copy the full SHA cf34e12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9fcbb14 - Browse repository at this point
Copy the full SHA 9fcbb14View commit details -
Configuration menu - View commit details
-
Copy full SHA for a77ff6e - Browse repository at this point
Copy the full SHA a77ff6eView commit details -
[Flang] Fix build failure on MacOS
std::clock_t can be an unsigned value on some platforms like MacOS and therefore needs a cast when initializing an std::clock_t value with -1. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D107972
Configuration menu - View commit details
-
Copy full SHA for abbcbc6 - Browse repository at this point
Copy the full SHA abbcbc6View commit details -
Configuration menu - View commit details
-
Copy full SHA for bec04a7 - Browse repository at this point
Copy the full SHA bec04a7View commit details -
Merge pull request flang-compiler#983 from bolgrebolgre/fir-dev
Lowering of EXPONENT, FRACTION, SET_EXPONENT intrinsic
Configuration menu - View commit details
-
Copy full SHA for 7af3b2a - Browse repository at this point
Copy the full SHA 7af3b2aView commit details -
Merge pull request flang-compiler#986 from kiranchandramohan/mac-clock
[Flang] Fix build failure on MacOS
Configuration menu - View commit details
-
Copy full SHA for b5e69bb - Browse repository at this point
Copy the full SHA b5e69bbView commit details -
Merge pull request flang-compiler#987 from kiranchandramohan/unused-fix
[NFC] Remove unused warning
Configuration menu - View commit details
-
Copy full SHA for f187a50 - Browse repository at this point
Copy the full SHA f187a50View commit details
Commits on Aug 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2daaaaa - Browse repository at this point
Copy the full SHA 2daaaaaView commit details -
Merge pull request flang-compiler#985 from flang-compiler/jpr-move-li…
…teral-name-helper [NFC] move LiteralNameHelper to remove front-end dependency in FIRBuilder
Configuration menu - View commit details
-
Copy full SHA for 09e8763 - Browse repository at this point
Copy the full SHA 09e8763View commit details -
[flang] Support DFLOAT legacy extension intrinsic function
Like the similar legacy extension FLOAT(), DFLOAT() represents a conversion from default integer to DOUBLE PRECISION. Rewrite into a conversion operation. Differential Revision: https://reviews.llvm.org/D107489
Configuration menu - View commit details
-
Copy full SHA for e611929 - Browse repository at this point
Copy the full SHA e611929View commit details -
[flang] runtime: For Fw.d formatting, don't oscillate forever
The algorithm for Fw.d output will drive binary to decimal conversion for an initial fixed number of digits, then adjust that number based on the result's exposent. For value close to a power of ten, this adjustment process wouldn't terminate; e.g., formatting 9.999 as F10.2 would start with 1e2, boost the digits to 2, get 9.99e1, decrease the digits, and loop. Solve by refusing to boost the digits a second time. Differential Revision: https://reviews.llvm.org/D107490
Configuration menu - View commit details
-
Copy full SHA for 1ffe791 - Browse repository at this point
Copy the full SHA 1ffe791View commit details -
[flang] Implement runtime Assign()
Define an API for, and implement, runtime support for arbitrary assignment of one descriptor's data to another, with full support for (re)allocation of allocatables with finalization when necessary, user-defined derived type assignment TBP calls, and intrinsic (default) componentwise assignment of derived type instances with allocation of automatic components. Also clean up API and implementation of finalization/destruction using knowledge gained while studying edge cases for assignment in the 2018 standard. The look-up procedure for special procedure bindings in derived types has been optimized from O(N) to O(1) since it will probably matter more. This required some analysis in runtime derived type description table construction in semantics and some changes to the table schemata. Executable Fortran tests have been developed; they'll be added to the test base once they can be lowered and run by f18. Differential Revision: https://reviews.llvm.org/D107678
Configuration menu - View commit details
-
Copy full SHA for 05024a8 - Browse repository at this point
Copy the full SHA 05024a8View commit details -
[flang] Silence new build warning
Some build environments complain about unused data members in some C++ translations of Fortran derived types; those members don't really need to be present, so remove them. Fix pushed w/o review to get build bots running again.
Configuration menu - View commit details
-
Copy full SHA for 7749198 - Browse repository at this point
Copy the full SHA 7749198View commit details -
[flang] Fix list-directed plural repeated null values at end of record
A repeated null value at the end of an input record with a count > 1 would incorrectly advance to the next record when resumed. Fix. Improve some poor naming and code flow noticed while debugging, so next time will be easier. Extend a unit test to check this case. Differential Revision: https://reviews.llvm.org/D107917
Configuration menu - View commit details
-
Copy full SHA for 5932214 - Browse repository at this point
Copy the full SHA 5932214View commit details -
[flang] Fix crash in runtime-type-info.cpp
Recent work in runtime assignments failed an assertion in fir-dev while running tests (flang/test/Semantics/defined-ops.f90). This test didn't fail in llvm-project/main because only the "new" Arm driver is used now, and that only builds runtime derived type information tables when some debug dumping options are enabled. So add a reproducing test case to another test that is run with -fdebug-dump-symbols, and fix the crash by emitting special procedure binding information only for type-bound generic ASSIGNMENT(=) bindings that are relevant to the runtime support library for use in intrinsic assignment of derived types. Differential Revision: https://reviews.llvm.org/D107918
Configuration menu - View commit details
-
Copy full SHA for 6e34406 - Browse repository at this point
Copy the full SHA 6e34406View commit details -
[Flang] Fix error messages on Windows.
Flang uses positional arguments for `messages::say()`, such as "%1$s" which is only supported in MS Compilers with the `_*printf_p` form of the function. This uses a conditional macro to convert the existing `vsnprintf` used to the one needed in MS-World. 7 tests in D107575 rely on this change. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107654
Configuration menu - View commit details
-
Copy full SHA for 1e930ad - Browse repository at this point
Copy the full SHA 1e930adView commit details -
[flang] Correct off-by-one error in SET_EXPONENT
SET_EXPONENT is returning values that are too large by a factor of two. Differential Revision: https://reviews.llvm.org/D107986
Configuration menu - View commit details
-
Copy full SHA for 5941a96 - Browse repository at this point
Copy the full SHA 5941a96View commit details -
Add line information to some fatal error to help debugging
This also had the benefit to slightly simplify the genStmtFunctionRef lowering code by using gen(Sym) that already produces nice error messages.
Configuration menu - View commit details
-
Copy full SHA for ec8d2a8 - Browse repository at this point
Copy the full SHA ec8d2a8View commit details -
[flang] Fix the SHIFT argument of the CSHIFT intrinsic
While working on EOSHIFT, I realized that the lowering code for the CSHIFT intrinsic was incorrect. The SHIFT argument was being passed as an address but was being treated as an integer value. My tests were accidentally working since the runtime code was taking the modulus of the address and coincidentally getting the correct value.
Configuration menu - View commit details
-
Copy full SHA for 73c4d38 - Browse repository at this point
Copy the full SHA 73c4d38View commit details -
Fix TODO with "not yet implemented intra-entity slice in fir.embox codegen". This comes up with slices of derived type components such as x(1:10:2)%j. Reformat some lines with clang-format. Incorporate comments, add test to Fir/embox.fir. Add check lines to the derived type slice embox test. Also re-do the previous embox test since it was not really doing anything.
Configuration menu - View commit details
-
Copy full SHA for 51fcaf0 - Browse repository at this point
Copy the full SHA 51fcaf0View commit details -
Merge pull request flang-compiler#978 from flang-compiler/ml-slice
Fix TODO with "not yet implemented intra-entity slice in fir.embox codegen"
Configuration menu - View commit details
-
Copy full SHA for 8b1bf21 - Browse repository at this point
Copy the full SHA 8b1bf21View commit details -
Merge pull request flang-compiler#992 from flang-compiler/ps-fix-cshift
[flang] Fix the SHIFT argument of the CSHIFT intrinsic
Configuration menu - View commit details
-
Copy full SHA for ca16318 - Browse repository at this point
Copy the full SHA ca16318View commit details -
Merge pull request flang-compiler#989 from flang-compiler/jpr-cherry-…
…pick-llvm Cherry pick all flang commits from LLVM since last cherry-picking
Configuration menu - View commit details
-
Copy full SHA for df94154 - Browse repository at this point
Copy the full SHA df94154View commit details -
Don't put compiler generated objects in equivalence groups (flang-com…
…piler#993) Equivalence analysis has some problems that may be addressed by shifting the core analysis to the front end. Pending such changes, don't attempt to place compiler generated objects in any equivalence group.
Configuration menu - View commit details
-
Copy full SHA for 7001237 - Browse repository at this point
Copy the full SHA 7001237View commit details -
Lowering for NEAREST intrinsic
- added basic implementation for lowering of the NEAREST intrinsic - added tests for lowering of the NEAREST intrinsic
Configuration menu - View commit details
-
Copy full SHA for 51295e5 - Browse repository at this point
Copy the full SHA 51295e5View commit details
Commits on Aug 14, 2021
-
Fix assertion "key not already in map".
Fix verification of fir.if bug. Some progress on the symbol not mapped cases. Add some TODOs. Add forall-2.f90 test file.
Configuration menu - View commit details
-
Copy full SHA for 704d5e2 - Browse repository at this point
Copy the full SHA 704d5e2View commit details
Commits on Aug 16, 2021
-
Merge pull request flang-compiler#991 from flang-compiler/jpr-add-lin…
…es-in-error Add line information to some fatal errors to help debugging
Configuration menu - View commit details
-
Copy full SHA for 04376a9 - Browse repository at this point
Copy the full SHA 04376a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for e648538 - Browse repository at this point
Copy the full SHA e648538View commit details -
Merge pull request flang-compiler#984 from flang-compiler/jpr-element…
…al-char Lower calls to elemental procedure with character arguments
Configuration menu - View commit details
-
Copy full SHA for f92b8a0 - Browse repository at this point
Copy the full SHA f92b8a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b03818 - Browse repository at this point
Copy the full SHA 6b03818View commit details -
Merge pull request flang-compiler#995 from flang-compiler/aperry-nearest
Lowering for NEAREST intrinsic
Configuration menu - View commit details
-
Copy full SHA for ba7b1b1 - Browse repository at this point
Copy the full SHA ba7b1b1View commit details
Commits on Aug 17, 2021
-
Lower elemental character function and elemental internal procedure
Split the scalar function lowering genRawProcedureRef in order to share the part that deals with explicit result allocation and host link passing with elemental procedure lowering. This code is split without any functional change. Use the new function in elemental procedure lowering. Instead of placing the result manually in a vector or mlir::Value, use the CallerInterface placeInput function, and let the scalar lowering deal with the result instantiation and the callOp. In order to be able to capture the CallerInterface object, its std::unique_ptr member is made a std::optional, this enable the creation of the implicit copy constructor.
Configuration menu - View commit details
-
Copy full SHA for 9f25471 - Browse repository at this point
Copy the full SHA 9f25471View commit details -
Merge pull request flang-compiler#996 from schweitzpgi/ch-forall4
Fix assertion "key not already in map".
Configuration menu - View commit details
-
Copy full SHA for 6114f8f - Browse repository at this point
Copy the full SHA 6114f8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 23d1a17 - Browse repository at this point
Copy the full SHA 23d1a17View commit details -
Configuration menu - View commit details
-
Copy full SHA for db84c08 - Browse repository at this point
Copy the full SHA db84c08View commit details
Commits on Aug 18, 2021
-
Merge pull request flang-compiler#1000 from flang-compiler/jpr-elemen…
…tal-explicit-result Lower elemental character function and elemental internal procedure
Configuration menu - View commit details
-
Copy full SHA for 34bba44 - Browse repository at this point
Copy the full SHA 34bba44View commit details -
[NFC] Move FirOpBuilder, ExtendedValue and tools into lib/Optimizer/B…
…uilder Many FIR related tools and helpers are not accessible in lib/Optimizer/Transform because they are part of lib/Lower library even though they only operate on FIR and MLIR data structures. Most of these tools are using the FirOpBuilder. Move this class into Optimizer/Builder/FirOpBuilder.h. Change FirOpBuilder namespace to fir. Similarly, the fir::ExtendedValue is a key data structure in all helpers. Move it under Optimizer/Builder/BoxValue.h. Its namespace was already fir. Split its implementation from Lower/SymbolMap.cpp into a new Optimzer/Builder/BoxValue.cpp file. The FirOpBuilder implementation depends on ComplexExpr.h, CharacterExpr.h, DoLoopHelper.h, and Allocatable.h. - Split Allocatable.h into Lower/Allocatable.h (that contains the API to lower allocation/association on front end data structure) and Optimizer/Builder/MutableBox.h (that contains the tools to work with MutableBoxValue) - Move CharacterExpr.h to Optimizer/Builder/Character.h. Implement a small genMin locally in Character.cpp to break the dependency with lib/Lower/intrinsicCall.cpp. - Move ComplexExpr.h to Optimizer/Builder/Complex.h. ComplexExpr.cpp depended on lib/Lower/ConvertType.cpp to convert a kind to a real type. Add a getRealType(kind) helper to FirOpBuilder using the kindMap instead. - Move DoLoopHelper.h to Optimizer/Builder/DoLoopHelper.h. Apart from the ExtendedValue and FirOpBuilder classes that are directly under fir namespace, all moved functions are placed under the fir::factory namespace since they generate big chunks of FIR to implement Fortran pattern. The lib/Optimizer/Builder files are added to a new libFIROpBuilder library. With all this, FirOpBuilder and related tools is available in lib/Optimizer and no new dependency is brought into lib/Optimizer.
Configuration menu - View commit details
-
Copy full SHA for 96658e3 - Browse repository at this point
Copy the full SHA 96658e3View commit details -
Merge pull request flang-compiler#999 from flang-compiler/jpr-move-bu…
…ilder-in-optimizer-5 [NFC] Move FirOpBuilder, ExtendedValue and tools into Optimizer/Builder
Configuration menu - View commit details
-
Copy full SHA for 9ec3a0e - Browse repository at this point
Copy the full SHA 9ec3a0eView commit details -
Put the check for dropping implied array arguments in the subexpressi…
…ons per review comment.
Configuration menu - View commit details
-
Copy full SHA for 73b357f - Browse repository at this point
Copy the full SHA 73b357fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d13ef2b - Browse repository at this point
Copy the full SHA d13ef2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 611074a - Browse repository at this point
Copy the full SHA 611074aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a8a280e - Browse repository at this point
Copy the full SHA a8a280eView commit details
Commits on Aug 19, 2021
-
[NFC] Move runtime API call generator into Optimizer/Runtime - part 1/2
Move the files without any change in this commit so that git can keep track of the rename. The commit does not compile without part 2.
Configuration menu - View commit details
-
Copy full SHA for 528737c - Browse repository at this point
Copy the full SHA 528737cView commit details -
[NFC] Move runtime API call generator into Optimizer/Runtime - part 2/2
In order to be able to emit runtime calls in FIR transformation passes, move the runtime call generators into Optimizer/Runtime. RTBuilder.h is moved there, as well as DerivedRuntime.h, NumericRuntime.h, ReductionRuntime.h, CharacterRuntime.h, and TransformationalRuntime.h All the methods are moved from the Fortran::lower namespace into a new fir::runtime namespace. Runtime.[h, cpp] is not moved yet because it uses parse tree nodes. There is no urgent need to move it now, so I did not attempted to split it in this PR. Allocatable.cpp and IO.cpp make direct usages of RTBuilder.h, it may be cleaner to handle the runtime call generation details in new Optimizer/xxx files, but this is not done here since this calls are not currently needed in lib/Optimizer.
Configuration menu - View commit details
-
Copy full SHA for 187b675 - Browse repository at this point
Copy the full SHA 187b675View commit details -
Merge pull request flang-compiler#1004 from flang-compiler/jpr-move-r…
…untime-in-optimizer-3 [NFC] Move runtime API call generator into Optimizer/Runtime
Configuration menu - View commit details
-
Copy full SHA for ec334d0 - Browse repository at this point
Copy the full SHA ec334d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd8dc16 - Browse repository at this point
Copy the full SHA fd8dc16View commit details -
cherry pick several runtime and intrinsic fixes (flang-compiler#1006)
* [flang] Fix regression from recent runtime input fix A recent runtime I/O change[1] was meant to improve the handling of input from external files missing a terminal newline on their last records; the change was "triggered" by the wrong circumstances and causing reads that should have pulled more data into the buffer to be treated as EOFs. So fix that, and also don't retain input data in the buffer once an input record has been finished unless it's known that list-directed or NAMELIST input of a repeated input item may need to backspace a non-positionable external unit to return to the beginning of the repeated item. [1] 6578893 Differential Revision: https://reviews.llvm.org/D108164 * [flang] Add missing call to BeginReadingRecord() NAMELIST input needs to start with a call to BeginReadingRecord(). Internal unit input doesn't care (so unit tests were passing), but external unit input does need the call and will assert without it. Differential Revision: https://reviews.llvm.org/D108051 * [flang] Fix the vector version of EOSHIFT with a BOUNDARY argument When the vector version of EOSHIFT was called, the BOUNDARY argument was being ignored. I fixed that and added a test that would not pass without this fix. Differential Revision: https://reviews.llvm.org/D108249 Co-authored-by: peter klausler <[email protected]> Co-authored-by: Peter Steinfeld <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ba3942f - Browse repository at this point
Copy the full SHA ba3942fView commit details
Commits on Aug 23, 2021
-
Implement pointer assignment in FORALL context.
This does not fix tests using substring operations.
Configuration menu - View commit details
-
Copy full SHA for c8d759e - Browse repository at this point
Copy the full SHA c8d759eView commit details
Commits on Aug 24, 2021
-
Fix a character constant mangling bug (flang-compiler#1010)
The hash portion of a character constant name is currently derived by hashing over a multiple of the actual character constant length, rather than the actual length. Incorporating arbitrary "garbage" characters in the hash value generation will not usually be a correctness issue because the resulting "invalid" hash name will be used for both the value definition and any references to it. However, beyond wasting compile time, it can create duplicate constants rather than reusing a single constant.
Configuration menu - View commit details
-
Copy full SHA for 1411c56 - Browse repository at this point
Copy the full SHA 1411c56View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87e5c48 - Browse repository at this point
Copy the full SHA 87e5c48View commit details -
Merge pull request flang-compiler#1009 from schweitzpgi/ch-forall6
Implement pointer assignment in FORALL context.
Configuration menu - View commit details
-
Copy full SHA for 31c0214 - Browse repository at this point
Copy the full SHA 31c0214View commit details
Commits on Aug 25, 2021
-
Lower derived array assignment and improve derived scalar assignment
Move the genRecordAssignment scalar assignment helper in fir::factory so that it can be used for the array case in ArrayCopyValue.cpp. Simplify genRecordAssignment to only lower as inline code the cases where a mem copy can be done to implement the derive type assignment (that is when their are no allocatable component, automatic component, or component requiring a user defined assignment calls). For the rest, use the runtime genAssign() that handles deep copies and user defined assignments. For the inline version, instead of working component by component, and using the array expression framework for array components, simply emit a derived type load + store. This is OK since the derived types assigned inlined have constant size. LLVM transform this into element by element assignment of llvm.memmove itself (opt --memcpyopt inserts memmove calls). This allows implementing the simple cases inlined without depending on the array expression framework (which is not possible during the ArrayCopyValue pass), or manually creating llvm.memmove, which would require inserting a fir.sizeof of to compute the byte size for the memmove.
Configuration menu - View commit details
-
Copy full SHA for de7bbdd - Browse repository at this point
Copy the full SHA de7bbddView commit details -
Merge pull request flang-compiler#1007 from flang-compiler/jpr-derive…
…d-array-assign Lower derived array assignments and improve derived scalar assignments
Configuration menu - View commit details
-
Copy full SHA for 1a3ab4a - Browse repository at this point
Copy the full SHA 1a3ab4aView commit details -
Revert "[flang] Add POSIX implementation for SYSTEM_CLOCK"
This reverts commit 2534d53.
Configuration menu - View commit details
-
Copy full SHA for 66af69c - Browse repository at this point
Copy the full SHA 66af69cView commit details -
Revert "[flang] Add default implementation for SYSTEM_CLOCK"
This reverts commit c4454f0.
Configuration menu - View commit details
-
Copy full SHA for 75ba7f3 - Browse repository at this point
Copy the full SHA 75ba7f3View commit details -
[flang] Add default implementation for SYSTEM_CLOCK
Add an implementation for the runtime functions related to SYSTEM_CLOCK. As with CPU_TIME, this is based on std::clock(), which should be available everywhere, but it is highly recommended to add platform-specific implementations for systems where std::clock() behaves poorly (e.g. POSIX). The documentation for std::clock() doesn't specify a maximum value and in fact wrap around behaviour is non-conforming. Therefore, this implementation of SYSTEM_CLOCK is not guaranteed to wrap around either, and after std::clock reaches its maximum value we will likely just return failure rather than wrap around. If this happens often on your system, please add a new platform-specific implementation. We define COUNT_MAX as either the maximum value that can be stored in a std::clock_t or in a 64-bit integer (whichever is smaller), and COUNT_RATE as CLOCKS_PER_SEC. For POSIX systems, the value of CLOCKS_PER_SEC is hardcoded to 10^6 and irrelevant for the values returned by std::clock. Differential Revision: https://reviews.llvm.org/D105969
Configuration menu - View commit details
-
Copy full SHA for d3daa0b - Browse repository at this point
Copy the full SHA d3daa0bView commit details -
[flang] Add POSIX implementation for SYSTEM_CLOCK
This is very similar to CPU_TIME, except that we return nanoseconds rather than seconds. This means we're potentially dealing with rather large numbers, so we'll have to wrap around to avoid overflows. Differential Revision: https://reviews.llvm.org/D105970
Configuration menu - View commit details
-
Copy full SHA for d1f65ff - Browse repository at this point
Copy the full SHA d1f65ffView commit details -
[flang] Implement Posix version of DATE_AND_TIME runtime
Use gettimeofday and localtime_r to implement DATE_AND_TIME intrinsic. The Windows version fallbacks to the "no date and time information available" defined by the standard (strings set to blanks and values to -HUGE). The implementation uses an ifdef between windows and the rest because from my tests, the SFINAE approach leads to undeclared name bogus errors with clang 8 that seems to ignore failure to instantiate is not an error for the function names (i.e., it understands it should not instantiate the version using gettimeofday if it is not there, but still yields an error that it is not declared on the spot where it is called in the uninstantiated version). Differential Revision: https://reviews.llvm.org/D108622
Configuration menu - View commit details
-
Copy full SHA for 980dde3 - Browse repository at this point
Copy the full SHA 980dde3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b12f68e - Browse repository at this point
Copy the full SHA b12f68eView commit details -
[flang][OpenMP] Add semantic checks for cancellation nesting
This patch implements the following semantic checks for cancellation constructs: ``` OpenMP Version 5.0 Section 2.18.1: CANCEL construct restriction: If construct-type-clause is taskgroup, the cancel construct must be closely nested inside a task or a taskloop construct and the cancel region must be closely nested inside a taskgroup region. If construct-type-clause is sections, the cancel construct must be closely nested inside a sections or section construct. Otherwise, the cancel construct must be closely nested inside an OpenMP construct that matches the type specified in construct-type-clause of the cancel construct. OpenMP Version 5.0 Section 2.18.2: CANCELLATION POINT restriction: A cancellation point construct for which construct-type-clause is taskgroup must be closely nested inside a task or taskloop construct, and the cancellation point region must be closely nested inside a taskgroup region. A cancellation point construct for which construct-type-clause is sections must be closely nested inside a sections or section construct. A cancellation point construct for which construct-type-clause is neither sections nor taskgroup must be closely nested inside an OpenMP construct that matches the type specified in construct-type-clause. ``` Also add test cases for the check. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D106538
Configuration menu - View commit details
-
Copy full SHA for 14cfb57 - Browse repository at this point
Copy the full SHA 14cfb57View commit details -
[flang][OpenMP] Add semantic check for teams nesting
This patch implements the following check for TEAMS construct: ``` OpenMP Version 5.0 Teams construct restriction: A teams region can only be strictly nested within the implicit parallel region or a target region. If a teams construct is nested within a target construct, that target construct must contain no statements, declarations or directives outside of the teams construct. ``` Also add one test case for the check. Reviewed By: kiranchandramohan, clementval Differential Revision: https://reviews.llvm.org/D106335
Configuration menu - View commit details
-
Copy full SHA for 88bc622 - Browse repository at this point
Copy the full SHA 88bc622View commit details -
[Flang] Fix for CI failure, Remove default case
Remove default case when all the enum values are covered in switch statements.
Configuration menu - View commit details
-
Copy full SHA for f1bfbe7 - Browse repository at this point
Copy the full SHA f1bfbe7View commit details -
[flang][OpenMP] Add semantic check for target nesting
This patch implements the following check for TARGET construct: ``` OpenMP Version 5.0 Target construct restriction: If a target update, target data, target enter data, or target exit data construct is encountered during execution of a target region, the behavior is unspecified. ``` Also add one test case for the check. Reviewed By: kiranchandramohan, clementval Differential Revision: https://reviews.llvm.org/D106165
Configuration menu - View commit details
-
Copy full SHA for 7f93fd3 - Browse repository at this point
Copy the full SHA 7f93fd3View commit details -
[flang] Extension: reduced scope for some implied DO loop indices
The index of an implied DO loop in a DATA statement or array constructor is defined by Fortran 2018 to have scope over its implied DO loop. This definition is unfortunate, because it requires the implied DO loop's bounds expressions to be in the scope of the index variable. Consequently, in code like integer, parameter :: j = 5 real, save :: a(5) = [(j, j=1, j)] the upper bound of the loop is a reference to the index variable, not the parameter in the enclosing scope. This patch limits the scope of the index variable to the "body" of the implied DO loop as one would naturally expect, with a warning. I would have preferred to make this a hard error, but most Fortran compilers treat this case as f18 now does. If the standard were to be fixed, the warning could be made optional. Differential Revision: https://reviews.llvm.org/D108595
Configuration menu - View commit details
-
Copy full SHA for d3a2c6f - Browse repository at this point
Copy the full SHA d3a2c6fView commit details -
[flang] runtime: fix WRITE after BACKSPACE on variable-length file
BACKSPACE leaves "recordLength" set, which is fine for a later READ, but it causes a later WRITE to fail due to a misinterpretation of the knowledge of the record length as indication of a fixed-length record file (RECL=). Fix. Differential Revision: https://reviews.llvm.org/D108594
Configuration menu - View commit details
-
Copy full SHA for a4814f7 - Browse repository at this point
Copy the full SHA a4814f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d195a85 - Browse repository at this point
Copy the full SHA d195a85View commit details -
Zero size array initializers (flang-compiler#1011)
Zero size array initializers Special case zero size arrays in genArrayLit. Reduce code duplication and dead FIR generation.
Configuration menu - View commit details
-
Copy full SHA for bf166d3 - Browse repository at this point
Copy the full SHA bf166d3View commit details
Commits on Aug 26, 2021
-
Merge pull request flang-compiler#1013 from flang-compiler/jpr-cherry…
…-pick Cherry pick all flang commits from LLVM since last cherry-picking
Configuration menu - View commit details
-
Copy full SHA for 6c1b99c - Browse repository at this point
Copy the full SHA 6c1b99cView commit details -
Make extern weak symbols for type descriptor not defined in translati…
…on unit If a derived type is defined in a module in another translation unit, its "<scope mangling>.dt.<typename>" global is not declared in the current translation unit in lowering, and therefore not accessible in codegen. The symbol is not lowered because it is not use associated in any of the program units lowered in the current translation unit. If we wanted to deal with this in lowering, we would need to start lowering declaration for all variables from the module used by the lowered program units, which is not the current approach in lowering). Declare a tentative (extern weak) type descriptor symbol in codegen if no global exists for the type descriptor symbol. It may be resolved at link time, and will otherwise be a nullptr (so far, do not make it a link error if the symbol is defined nowhere to support codegen of FIR files produced without runtime info symbols for debug purposes).
Configuration menu - View commit details
-
Copy full SHA for a8bea8e - Browse repository at this point
Copy the full SHA a8bea8eView commit details -
Merge pull request flang-compiler#1014 from flang-compiler/jpr-c1b-fix
Make extern weak symbols for type descriptor not defined in translation unit
Configuration menu - View commit details
-
Copy full SHA for e94d0b5 - Browse repository at this point
Copy the full SHA e94d0b5View commit details -
Merge pull request flang-compiler#1012 from flang-compiler/jpr-date-a…
…nd-time-lowering-update DATE_AND_TIME update after runtime upstreaming
Configuration menu - View commit details
-
Copy full SHA for 880871c - Browse repository at this point
Copy the full SHA 880871cView commit details -
[flang] Take result length into account in ApplyElementwise folding
ApplyElementwise on character operation was always creating a result ArrayConstructor with the length of the left operand. This is not correct for concatenation and SetLength operations. Compute and thread the length to the spot creating the ArrayConstructor so that the length is correct for those character operations. Differential Revision: https://reviews.llvm.org/D108711
Configuration menu - View commit details
-
Copy full SHA for e31ba91 - Browse repository at this point
Copy the full SHA e31ba91View commit details -
Merge pull request flang-compiler#1016 from flang-compiler/jpr-cherry…
…-pick-fma1-fix Cherry-pick [flang] Take result length into account in ApplyElementwise folding
Configuration menu - View commit details
-
Copy full SHA for 38afb0f - Browse repository at this point
Copy the full SHA 38afb0fView commit details -
[NFC fix] merge FIRRuntime in FIRBuilder to break circular deps - part 1
Simply move the files without any change so that git can keep track of the rename. CMakeLists.txt are updated. Other changes required to get in a buildable state will be in a part 2 commit.
Configuration menu - View commit details
-
Copy full SHA for 82ed8cd - Browse repository at this point
Copy the full SHA 82ed8cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for f9261b1 - Browse repository at this point
Copy the full SHA f9261b1View commit details
Commits on Aug 27, 2021
-
Merge pull request flang-compiler#1017 from flang-compiler/jpr-fix-ci…
…rcular-deps [NFC fix] merge FIRRuntime in FIRBuilder to break circular deps
Configuration menu - View commit details
-
Copy full SHA for 0c61733 - Browse repository at this point
Copy the full SHA 0c61733View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87ecafe - Browse repository at this point
Copy the full SHA 87ecafeView commit details
Commits on Aug 30, 2021
-
Merge pull request flang-compiler#1018 from flang-compiler/jpr-derive…
…d-type-lbs Add hard todo for non default component lower bounds
Configuration menu - View commit details
-
Copy full SHA for 305d05a - Browse repository at this point
Copy the full SHA 305d05aView commit details -
[flang] Apply double precision KindCode in specific proc interface
The double precision KindCode was ignored when building the interface of specific intrinsic procedures leading to bad semantics checks. Differential Revision: https://reviews.llvm.org/D108828
Configuration menu - View commit details
-
Copy full SHA for c976e64 - Browse repository at this point
Copy the full SHA c976e64View commit details -
Fix test failure with non default component lower bounds
forall.f90 tested used non-default array component lower bounds. Lowering does not implement this correctly yet and a TODO was added for this which now fires in the test.
Configuration menu - View commit details
-
Copy full SHA for 110fefa - Browse repository at this point
Copy the full SHA 110fefaView commit details -
Lowering for EOSHIFT intrinsic
- added implementation for lowering of the EOSHIFT intrinsic - added tests for this implementation
Configuration menu - View commit details
-
Copy full SHA for 20b933b - Browse repository at this point
Copy the full SHA 20b933bView commit details
Commits on Aug 31, 2021
-
Merge pull request flang-compiler#1022 from flang-compiler/jpr-specna…
…m-iface-issue-2 Cherry-pick actual/dummy mismatch error fix
Configuration menu - View commit details
-
Copy full SHA for feec79c - Browse repository at this point
Copy the full SHA feec79cView commit details -
Handle vector subscripts that are not whole contiguous symbols
The array framework was building an inexact shape for the array subscript expression `x(<vector subscript expr>)` when it is not able to compute the actual shape of `<vector subscript expr>`. The inexact shape was the shape of `x`. The code was defaulting in to the inexact shape when `<vector subscript expr>` is a designator that is a descriptor while this was not needed. This lead to runtime crash like the one reported in flang-compiler#1019. Fix: Simply compute the vector subscript shape from the vector subscript fir.array_load with the existing getShape(arrayLoad) helper. This covers the cases where the vector subscripts is not a whole symbols (function results, array sections, operation results...), with even less code.
Configuration menu - View commit details
-
Copy full SHA for 344abfa - Browse repository at this point
Copy the full SHA 344abfaView commit details -
Merge pull request flang-compiler#1023 from flang-compiler/jpr-fix-is…
…sue-1019 Handle vector subscripts that are descriptors - Fix flang-compiler#1019
Configuration menu - View commit details
-
Copy full SHA for fa3e602 - Browse repository at this point
Copy the full SHA fa3e602View commit details -
EOSHIFT Lowering - address review comments
- boundary should be passed as address - no need to codegen everything in the absence of a boundary argument, use a fir::AbsentOp with a generic NoneType Box instead - update unittest
Configuration menu - View commit details
-
Copy full SHA for bffea5c - Browse repository at this point
Copy the full SHA bffea5cView commit details
Commits on Sep 1, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3a164ae - Browse repository at this point
Copy the full SHA 3a164aeView commit details -
[mlir] support collapsed loops in OpenMP-to-LLVM translation
Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D105706
Configuration menu - View commit details
-
Copy full SHA for f8144e6 - Browse repository at this point
Copy the full SHA f8144e6View commit details -
[flang][OpenMP] Support for Collapse
Convert Fortran parse-tree into MLIR for collapse-clause. Includes simple Fortran to LLVM-IR test, with auto-generated check-lines (some of which have been edited by hand).
Configuration menu - View commit details
-
Copy full SHA for e459d4d - Browse repository at this point
Copy the full SHA e459d4dView commit details -
Merge pull request flang-compiler#1024 from flang-compiler/aperry-eos…
…hift Lowering for EOSHIFT intrinsic
Configuration menu - View commit details
-
Copy full SHA for 2a40e62 - Browse repository at this point
Copy the full SHA 2a40e62View commit details
Commits on Sep 2, 2021
-
[flang] Add runtime interface for COMMAND_ARGUMENT_COUNT
Differential Revision: https://reviews.llvm.org/D108687
Configuration menu - View commit details
-
Copy full SHA for bb06cb0 - Browse repository at this point
Copy the full SHA bb06cb0View commit details -
[flang] Add runtime interface for GET_COMMAND_ARGUMENT
GET_COMMAND_ARGUMENT takes a lot of optional arguments: VALUE, LENGTH, STATUS and ERRMSG. This patch breaks up the interface into 2 different functions: * One for getting the LENGTH of an argument. * One for getting the VALUE and the ERRMSG of an argument. This returns the STATUS, which can be easily ignored by lowering if it is missing in the invocation. Differential Revision: https://reviews.llvm.org/D108688
Configuration menu - View commit details
-
Copy full SHA for c77ef6e - Browse repository at this point
Copy the full SHA c77ef6eView commit details -
Implement folding of the transformational intrinsic function CSHIFT for all types. Differential Revision: https://reviews.llvm.org/D108931
Configuration menu - View commit details
-
Copy full SHA for 56c6432 - Browse repository at this point
Copy the full SHA 56c6432View commit details -
Implement constant folding for the transformational intrinsic function EOSHIFT. Differential Revision: https://reviews.llvm.org/D108941
Configuration menu - View commit details
-
Copy full SHA for 67262fd - Browse repository at this point
Copy the full SHA 67262fdView commit details -
Implement compile-time constant folding for the transformational intrinsic function PACK. Differential Revision: https://reviews.llvm.org/D108956
Configuration menu - View commit details
-
Copy full SHA for cfa4946 - Browse repository at this point
Copy the full SHA cfa4946View commit details -
[flang] Downgrade inappropriate error message to a warning
It may not be great practice to pass a procedure (or procedure pointer) with an implicit interface as an actual argument to correspond with a dummy procedure (pointer), but it's not an error. Change to a warning, and modify tests accordingly. Differential Revision: https://reviews.llvm.org/D108932
Configuration menu - View commit details
-
Copy full SHA for a44240c - Browse repository at this point
Copy the full SHA a44240cView commit details -
[flang] Fold UNPACK and TRANSPOSE
Implement constant folding for the transformational intrinsic functions UNPACK and TRANSPOSE. Differential Revision: https://reviews.llvm.org/D109010
Configuration menu - View commit details
-
Copy full SHA for 4576068 - Browse repository at this point
Copy the full SHA 4576068View commit details -
[flang] Set default form if unspecified at end of OPEN statement
The standard specifies that the form must be set to a default at the end of an open statement (C.7.4 point 2) where it was not specified. Only in the case of a pre-connected unit can the form be deferred until the first data transfer statement. Set back the default form setting in OpenStatementState::EndIoStatement that had been removed when deferring the pre-connected unit from setting in 199a623. Also return "UNDEFINED" instead of "UNKNOWN" to the FORM inquiry when the form was not yet specified as defined in 12.10.2.12. Related test: syntax 215a216. Differential Revision: https://reviews.llvm.org/D108990
Configuration menu - View commit details
-
Copy full SHA for 2eb81ad - Browse repository at this point
Copy the full SHA 2eb81adView commit details -
Merge pull request flang-compiler#1028 from flang-compiler/jpr-cherry…
…-picking Cherry pick all flang commits from LLVM since last cherry-picking
Configuration menu - View commit details
-
Copy full SHA for 53d598b - Browse repository at this point
Copy the full SHA 53d598bView commit details -
This is a major restructuring of how FORALL loops are lowered in the bridge from parse trees to FIR. Previously, FORALL loops had been lowered like any other structured control-flow loops and then as a more dynamic form of array expression. This refactoring is a middle road approach where the FORALL context is analyzed and then lowered in the bridge. This allows lowering to create loop nests that correctly deal with impure expressions and pure masking expressions, which were not aligned with array expressions. Lowering of assignment statements in the FORALL context is then done within the pre-built context by expression lowering. Secondly, expression lowering is refactored into a new "scalar array" traversal and code gen that works with array values as instantiated by the bridge in the earlier loop generation phase. Switching to this structure allows the array expression framework to be simplified since it no longer is required to deal with "special" scalar expressions and try to raise them into an array form. Allocatable arrays and pointer assignments are supported. User-defined ASSIGNMENT in (scalar) FORALL contexts is supported. This also introduces several correctness fixes. This does not correct known problems with arrays of CHARACTER, incomplete information with respect to derived types, elemental user-defined ASSIGNMENT in array expressions, PDTs, etc.
Configuration menu - View commit details
-
Copy full SHA for 128ce22 - Browse repository at this point
Copy the full SHA 128ce22View commit details
Commits on Sep 3, 2021
-
[flang] Include default component initialization in static initializers
The combined initializers constructed from DATA statements and explicit static initialization in declarations needs to include derived type component default initializations, overriding those default values without complaint with values from explicit DATA statement or declaration initializations when they overlap. This also has to work for objects with storage association due to EQUIVALENCE. When storage association causes default component initializations to overlap, emit errors if and only if the values differ (See Fortran 2018 subclause 19.5.3, esp. paragraph 10). The f18 front-end has a module that analyzes and converts DATA statements into equivalent static initializers for objects. For storage-associated objects, compiler-generated objects are created that overlay the entire association and fill it with a combined initializer. This "data-to-inits" module already exists, and this patch is essentially extension and clean-up of its machinery to complete the job. Also: emit EQUIVALENCE to module files; mark compiler-created symbols and *don't* emit those to module files; check non-static EQUIVALENCE sets for conflicting default component initializations, so lowering doesn't have to check them or emit diagnostics. Differential Revision: https://reviews.llvm.org/D109022
Configuration menu - View commit details
-
Copy full SHA for 2852010 - Browse repository at this point
Copy the full SHA 2852010View commit details -
Update lowering of equivalences after semantics change.
Semantics analysis is now doing an analysis of equivalence default and explicit initializations to detect conflicting initializations. This allows lowering to re-use semantics tools/results and: 1. Remove the interval analysis and use GetStorageAssociations to get a group of symbol that belongs to the same aggregate. 2. Simplify the static equivalence initialization lowering (simply use the generated integer array expression with the equivalence initial value, that already combines all the equivalence members default and explicit initialization). Side consequences of this change: 1. The aggregate storage names are changed, they now use the first member name in alphabetical order. The rational is to cover the cases where we need to ensure that the same name is built in two different translation unit for a same equivalence. The previous naming was relying on a mix of offset and scope order. There is no guarantee the scope order is the same in module files. 2. The aggregate storage types are now fir.array<sizexiw> where size*w/8 is the equivalence storage size and w is the biggest possible storage units given the equivalence member types and Fortran storage unit rules.
Configuration menu - View commit details
-
Copy full SHA for de404fd - Browse repository at this point
Copy the full SHA de404fdView commit details -
Merge pull request flang-compiler#1029 from flang-compiler/jpr-update…
…-equivalence-handling Jpr update equivalence handling
Configuration menu - View commit details
-
Copy full SHA for 7a5a1a1 - Browse repository at this point
Copy the full SHA 7a5a1a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdf369b - Browse repository at this point
Copy the full SHA bdf369bView commit details -
Merge pull request flang-compiler#1030 from schweitzpgi/ch-forall
FORALL lowering
Configuration menu - View commit details
-
Copy full SHA for 66328d5 - Browse repository at this point
Copy the full SHA 66328d5View commit details
Commits on Sep 4, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9c2688f - Browse repository at this point
Copy the full SHA 9c2688fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ada9831 - Browse repository at this point
Copy the full SHA ada9831View commit details
Commits on Sep 6, 2021
-
Merge pull request flang-compiler#1034 from schweitzpgi/ch-p8a
Fix for overly assertive assertion.
Configuration menu - View commit details
-
Copy full SHA for 4005808 - Browse repository at this point
Copy the full SHA 4005808View commit details -
Merge pull request flang-compiler#1035 from schweitzpgi/ch-n4e.n1
Fix bug with adjusted array element value types.
Configuration menu - View commit details
-
Copy full SHA for d471d6f - Browse repository at this point
Copy the full SHA d471d6fView commit details
Commits on Sep 7, 2021
-
Handle zero sized equivalence in lowering
The interval of zero sized equivalence storage looks like `[i, i[`, so when looking for an interval where `i` belongs, the PFT analysis was crashing. Accept `[i, i[` to be the right interval of null sized symbol starting at i.
Configuration menu - View commit details
-
Copy full SHA for 4f77995 - Browse repository at this point
Copy the full SHA 4f77995View commit details -
Fix array value threading to allow degenerate assignments. The front end
will emit a warning about a scalar variable assignment only, so lowering cannot assume the assignment can be raised to array form.
Configuration menu - View commit details
-
Copy full SHA for 0648a81 - Browse repository at this point
Copy the full SHA 0648a81View commit details -
Fix fir.coordinate_of op use with char<kind,?> types.
The coordinate_of op requires a constant sized type, so it will not work correctly if used with fir.char with unknown length. The code was already computing the correct offsets from runtime values, but the type was not being converted resulting in internal errors in code gen.
Configuration menu - View commit details
-
Copy full SHA for 4b4021a - Browse repository at this point
Copy the full SHA 4b4021aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf2d407 - Browse repository at this point
Copy the full SHA bf2d407View commit details
Commits on Sep 8, 2021
-
[flang] Fix non-deterministic line output function
The evaluation order for the `|` operator is undefined (in contrast to the short-circuiting `||` operator). The arguments are stored in variables to force a specific evaluation order. A test in D107575 relies on this change. Reviewed By: kiranchandramohan, klausler Differential Revision: https://reviews.llvm.org/D108623
Configuration menu - View commit details
-
Copy full SHA for be5d30f - Browse repository at this point
Copy the full SHA be5d30fView commit details -
[flang] NFC: change non-nullable pointer arguments to references
Ticking off a Parser TODO: Preprocessor::Directive()'s Prescanner argument should be a reference, not a pointer. Differential Revision: https://reviews.llvm.org/D109094
Configuration menu - View commit details
-
Copy full SHA for b9735b2 - Browse repository at this point
Copy the full SHA b9735b2View commit details -
[flang] Fix scope in which undeclared symbols are created
Don't create new symbols in FORALL, implied DO, or other construct scopes when an undeclared name appears; use the innermost enclosing program unit's scope. This clears up a pending TODO in name resolution, and also exposes (& fixes) an unnoticed name resolution problem in a module file test. Differential Revision: https://reviews.llvm.org/D109095
Configuration menu - View commit details
-
Copy full SHA for 011a901 - Browse repository at this point
Copy the full SHA 011a901View commit details -
[flang] Extend common block size to cover equivalence storage
The size of common block should be extended to cover any storage sequence that are storage associated with the common block via equivalences (8.10.2.2 point 1 (2)). In symbol size and offset computation, the size of the common block was not always extended to cover storage association. It was only done if the "base symbol of an equivalence group"(*) appeared in a common block statement. Correct this to cover all cases where a symbol appearing in a common block statement is storage associated. (*) the base symbol of an equivalence group is the symbol whose storage starts first in a storage association (if several symbols starts first, the base symbol is the last one visited by the algorithm going through the equivalence sets). Differential Revision: https://reviews.llvm.org/D109156
Configuration menu - View commit details
-
Copy full SHA for 82c7d3d - Browse repository at this point
Copy the full SHA 82c7d3dView commit details -
[mlir][flang] Do not prevent integer types from being parsed as MLIR …
…keywords DialectAsmParser::parseKeyword is rejecting `'i' digit+` while it is a valid identifier according to mlir/docs/LangRef.md. Integer types actually used to be TOK_KEYWORD a while back before the change: llvm@6af866c. This patch Modifies `isCurrentTokenAKeyword` to return true for tokens that match integer types too. The motivation for this change is the parsing of `!fir.type<{` `component-name: component-type,`+ `}>` type in FIR that represent Fortran derived types. The component-names are parsed as keywords, and can very well be i32 or any ixxx (which are valid Fortran derived type component names). The Quant dialect type parser had to be modified since it relied on `iw` not being parsed as keywords. Differential Revision: https://reviews.llvm.org/D108913
Configuration menu - View commit details
-
Copy full SHA for e8c242a - Browse repository at this point
Copy the full SHA e8c242aView commit details -
Remove blank from NaN string representation
Flang front end function DumpHexadecimal generates a string representation of a REAL value. When the value is a NaN, the string contains a blank, as in "NaN 0x7fc00000". This function is used by lowering to generate a string that is then passed to llvm Support function convertFromStringSpecials, which does not expect a blank in the string. Remove the blank to allow correct recognition of a NaN by this llvm function. Note that function DumpHexadecimal is not exercised by the front end itself. This functionality is only exercised by code that is not yet present in llvm.
Configuration menu - View commit details
-
Copy full SHA for aaf83b5 - Browse repository at this point
Copy the full SHA aaf83b5View commit details -
Merge pull request flang-compiler#1037 from flang-compiler/jpr-fix-ch…
…14egs Handle zero sized equivalence in lowering
Configuration menu - View commit details
-
Copy full SHA for 8fe40e0 - Browse repository at this point
Copy the full SHA 8fe40e0View commit details -
Merge pull request flang-compiler#1039 from schweitzpgi/ch-p9
Fix array value threading to allow degenerate assignments. The front end
Configuration menu - View commit details
-
Copy full SHA for d3c498a - Browse repository at this point
Copy the full SHA d3c498aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 735c474 - Browse repository at this point
Copy the full SHA 735c474View commit details -
Merge pull request flang-compiler#1045 from schweitzpgi/ch-m1a
Fix fir.coordinate_of op use with char<kind,?> types.
Configuration menu - View commit details
-
Copy full SHA for eac8473 - Browse repository at this point
Copy the full SHA eac8473View commit details
Commits on Sep 9, 2021
-
[flang] Move runtime API headers to flang/include/flang/Runtime
This commit cherry-picks the change that Peter made in llvm-project and makes additional changes to account for the differences between fir-dev and llvm-project. Here's the original message from Peter's change in Phabricator in llvm-project: Move the closure of the subset of flang/runtime/*.h header files that are referenced by source files outside flang/runtime (apart from unit tests) into a new directory (flang/include/flang/Runtime) so that relative include paths into ../runtime need not be used. flang/runtime/pgmath.h.inc is moved to flang/include/flang/Evaluate; it's not used by the runtime. Differential Revision: https://reviews.llvm.org/D109107
Configuration menu - View commit details
-
Copy full SHA for 443c77a - Browse repository at this point
Copy the full SHA 443c77aView commit details -
Merge pull request flang-compiler#1047 from flang-compiler/ps-cherry-…
…pick [flang] Move runtime API headers to flang/include/flang/Runtime
Configuration menu - View commit details
-
Copy full SHA for df66885 - Browse repository at this point
Copy the full SHA df66885View commit details
Commits on Sep 10, 2021
-
Move the scope of the mask buffers to just outside the outermost FORA…
…LL context. Add the ability to allocate array buffers in a lazy manner. This can be helpful if the size of a temporary buffer isn't easily computed before the loop nest begins execution.
Configuration menu - View commit details
-
Copy full SHA for 8130cad - Browse repository at this point
Copy the full SHA 8130cadView commit details -
[flang] Signal EOR in non advancing IO and move to next record
When an end of record is met in non advancing IO: - Set IOSTAT if present according to 12.11.4 (5). - Position the file to the next record (12.11.4 (4)). The previous code was only signaling EOR for fixed record length IO. Reading at 12.11.4, I do not find the rational for this condition, so I removed it. It also does not seem the presence of padding should prevent the EOR signaling. The positionning to the next record was block when EOR is signaling in FinishReadingRecord because ErrorHandler.isError() is true in this case. EOR in input is not an error, but I am not confident to modify ErrorHandler.isError() to cover that. However, In FinishReadingRecord, the code should not bail if the error is simply an end of record. I did not check the SIZE requirements here because GetSize runtime is not yet implemented. Differential Revision: https://reviews.llvm.org/D109505
Configuration menu - View commit details
-
Copy full SHA for 424c2e0 - Browse repository at this point
Copy the full SHA 424c2e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8399bd1 - Browse repository at this point
Copy the full SHA 8399bd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f1cecf5 - Browse repository at this point
Copy the full SHA f1cecf5View commit details -
Merge pull request flang-compiler#1049 from schweitzpgi/ch-fw-lazy
Move the scope of the mask buffers to just outside the outermost FORA…
Configuration menu - View commit details
-
Copy full SHA for 3ef51bf - Browse repository at this point
Copy the full SHA 3ef51bfView commit details -
Merge pull request flang-compiler#1052 from flang-compiler/jpr-e78-lo…
…wering Cherry pick non advancing IO runtime fix and add TODO for Size= specifier
Configuration menu - View commit details
-
Copy full SHA for 0895ac2 - Browse repository at this point
Copy the full SHA 0895ac2View commit details
Commits on Sep 12, 2021
-
[OpenMP][MLIR] Add a conversion pattern for the master op
The conversion pattern is particularly useful for conversion of block arguments in the master op. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D109610
Configuration menu - View commit details
-
Copy full SHA for 393bce2 - Browse repository at this point
Copy the full SHA 393bce2View commit details
Commits on Sep 13, 2021
-
Merge pull request flang-compiler#1053 from kiranchandramohan/fix_master
[OpenMP][MLIR] Add a conversion pattern for the master op
Configuration menu - View commit details
-
Copy full SHA for 410a9c2 - Browse repository at this point
Copy the full SHA 410a9c2View commit details -
[flang] Fix passing parts of array as writeable argument
Always create a boxargument if we have an array, so that we can pass the address, rather than create a temporary array (that wasn't being copied back). This allows subroutines and functions to modify parts of arrays passed into them. Fixes flang-compiler#1001
Configuration menu - View commit details
-
Copy full SHA for cd0be43 - Browse repository at this point
Copy the full SHA cd0be43View commit details
Commits on Sep 14, 2021
-
Merge pull request flang-compiler#969 from Leporacanthicus/collapse
[flang][OpenMP] Add support for collapse clause
Configuration menu - View commit details
-
Copy full SHA for 18ec1ad - Browse repository at this point
Copy the full SHA 18ec1adView commit details -
Configuration menu - View commit details
-
Copy full SHA for fbb3d2e - Browse repository at this point
Copy the full SHA fbb3d2eView commit details -
[mlir] ODS: do not emit trailing const for static methods
The generated C++ would be invalid. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D104233
Configuration menu - View commit details
-
Copy full SHA for 77cad11 - Browse repository at this point
Copy the full SHA 77cad11View commit details -
[mlir] separable registration of attribute and type interfaces
It may be desirable to provide an interface implementation for an attribute or a type without modifying the definition of said attribute or type. Notably, this allows to implement interfaces for attributes and types outside of the dialect that defines them and, in particular, provide interfaces for built-in types. Provide the mechanism to do so. Currently, separable registration requires the attribute or type to have been registered with the context, i.e. for the dialect containing the attribute or type to be loaded. This can be relaxed in the future using a mechanism similar to delayed dialect interface registration. See https://llvm.discourse.group/t/rfc-separable-attribute-type-interfaces/3637 Depends On D104233 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D104234
Configuration menu - View commit details
-
Copy full SHA for 14cde52 - Browse repository at this point
Copy the full SHA 14cde52View commit details -
[mlir] Avoid GCC naming conflict.
Rename AbstractType to AbstractTy to avoid a GCC naming conflict after https://reviews.llvm.org/D104234. Differential Revision: https://reviews.llvm.org/D104297
Configuration menu - View commit details
-
Copy full SHA for 2e4d158 - Browse repository at this point
Copy the full SHA 2e4d158View commit details -
[mlir] separable registration of operation interfaces
This is similar to attribute and type interfaces and mostly the same mechanism (FallbackModel / ExternalModel, ODS generation). There are minor differences in how the concept-based polymorphism is implemented for operations that are accounted for by ODS backends, and this essentially adds a test and exposes the API. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D104294
Configuration menu - View commit details
-
Copy full SHA for ecd06db - Browse repository at this point
Copy the full SHA ecd06dbView commit details -
[mlir] Enable delayed registration of attribute/operation/type interf…
…aces This functionality is similar to delayed registration of dialect interfaces. It allows external interface models to be registered before the dialect containing the attribute/operation/type interface is loaded, or even before the context is created. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D104397
Configuration menu - View commit details
-
Copy full SHA for 9621722 - Browse repository at this point
Copy the full SHA 9621722View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef203f5 - Browse repository at this point
Copy the full SHA ef203f5View commit details -
[mlir] Split things dependent on LLVM_DEBUG into a .cpp file
LLVM_DEBUG in headers is awkward, better avoid it. DEBUG_TYPE in a header results in a lot of macro redefinition warnings.
Configuration menu - View commit details
-
Copy full SHA for e0c2e79 - Browse repository at this point
Copy the full SHA e0c2e79View commit details -
[mlir] add support for reductions in OpenMP WsLoopOp
Use a modeling similar to SCF ParallelOp to support arbitrary parallel reductions. The two main differences are: (1) reductions are named and declared beforehand similarly to functions using a special op that provides the neutral element, the reduction code and optionally the atomic reduction code; (2) reductions go through memory instead because this is closer to the OpenMP semantics. See https://llvm.discourse.group/t/rfc-openmp-reduction-support/3367. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D105358
Configuration menu - View commit details
-
Copy full SHA for 713ca6b - Browse repository at this point
Copy the full SHA 713ca6bView commit details -
[OMPIRBuilder] add minimalist reduction support
This introduces a builder function for emitting IR performing reductions in OpenMP. Reduction variable privatization and initialization to the reduction-neutral value is expected to be handled separately. The caller provides the reduction functions. Further commits can provide implementation of reduction functions for the reduction operators defined in the OpenMP specification. This implementation was tested on an MLIR fork targeting OpenMP from C and produced correct executable code. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D104928
Configuration menu - View commit details
-
Copy full SHA for 7208d06 - Browse repository at this point
Copy the full SHA 7208d06View commit details -
[OpenMPIRBuilder] Add a constructor to ReductionInfo to appease gcc5
Otherwise, it produces wrong code for brace initializers.
Configuration menu - View commit details
-
Copy full SHA for c046931 - Browse repository at this point
Copy the full SHA c046931View commit details -
[MLIR][OpenMP] Add support for critical construct
This patch adds the critical construct to the OpenMP dialect. The implementation models the definition in 2.17.1 of the OpenMP 5 standard. A name and hint can be specified. The name is a global entity or has external linkage, it is modelled as a FlatSymbolRefAttr. Hint is modelled as an integer enum attribute. Also lowering to LLVM IR using the OpenMP IRBuilder. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D107135
Configuration menu - View commit details
-
Copy full SHA for 7549dcf - Browse repository at this point
Copy the full SHA 7549dcfView commit details -
[mlir] support collapsed loops in OpenMP-to-LLVM translation
Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D105706
Configuration menu - View commit details
-
Copy full SHA for 3fac959 - Browse repository at this point
Copy the full SHA 3fac959View commit details -
[OMPIRBuilder] Clarify CanonicalLoopInfo. NFC.
Add in-source documentation on how CanonicalLoopInfo is intended to be used. In particular, clarify what parts of a CanonicalLoopInfo is considered part of the loop, that those parts must be side-effect free, and that InsertPoints to instructions outside those parts can be expected to be preserved after method calls implementing loop-associated directives. CanonicalLoopInfo are now invalidated after it does not describe canonical loop anymore and asserts when trying to use it afterwards. In addition, rename `createXYZWorkshareLoop` to `applyXYZWorkshareLoop` and remove the update location to avoid that the impression that they insert something from scratch at that location where in reality its InsertPoint is ignored. createStaticWorkshareLoop does not return a CanonicalLoopInfo anymore. First, it was not a canonical loop in the clarified sense (containing side-effects in form of calls to the OpenMP runtime). Second, it is ambiguous which of the two possible canonical loops it should actually return. It will not be needed before a feature expected to be introduced in OpenMP 6.0 Also see discussion in D105706. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D107540
Configuration menu - View commit details
-
Copy full SHA for 8379767 - Browse repository at this point
Copy the full SHA 8379767View commit details -
[mlir] support translating OpenMP loops with reductions
Use the recently introduced OpenMPIRBuilder facility to transate OpenMP workshare loops with reductions to LLVM IR calling OpenMP runtime. Most of the heavy lifting is done at the OpenMPIRBuilder. When other OpenMP dialect constructs grow support for reductions, the translation can be updated to operate on, e.g., an operation interface for all reduction containers instead of workshare loops specifically. Designing such a generic translation for the single operation that currently supports reductions is premature since we don't know how the reduction modeling itself will be generalized. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D107343
Configuration menu - View commit details
-
Copy full SHA for 406415a - Browse repository at this point
Copy the full SHA 406415aView commit details -
[MLIR][OpenMP] Add support for declaring critical construct names
Add an operation omp.critical.declare to declare names/symbols of critical sections. Named omp.critical operations should use symbols declared by omp.critical.declare. Having a declare operation ensures that the names of critical sections are global and unique. In the lowering flow to LLVM IR, the OpenMP IRBuilder creates unique names for critical sections. Reviewed By: ftynse, jeanPerier Differential Revision: https://reviews.llvm.org/D108713
Configuration menu - View commit details
-
Copy full SHA for 4ff1d0f - Browse repository at this point
Copy the full SHA 4ff1d0fView commit details -
Zero size arrays of derived type (flang-compiler#1050)
Fix two problems with zero size arrays with derived type elements. The first problem occurs when the derived type element of a zero size array has default initialization. -- fix in ConvertVariable.cpp type dt integer :: j = 17 end type type(dt) :: z(0) The second problem occurs when the derived type element of a zero size array has an explicit, conformable, scalar initialization. That appears to be standard conforming, if not too useful, although it has the side affect of forcing the SAVE attribute on z. -- fix in ConvertExpr.cpp type dt integer :: j end type type(dt) :: z(0) = dt(99) Also add a verifier for fir.insert_on_range ops, which triggers for the first test case without the corresponding fix.
Configuration menu - View commit details
-
Copy full SHA for bf8ebcd - Browse repository at this point
Copy the full SHA bf8ebcdView commit details
Commits on Sep 15, 2021
-
Use name of an equivalence member in local aggregate alloca
The member symbol that gives its name to the equivalence storage is the first in lexicographical order (just like for global aggregate).
Configuration menu - View commit details
-
Copy full SHA for 7e78754 - Browse repository at this point
Copy the full SHA 7e78754View commit details -
Merge pull request flang-compiler#1036 from Leporacanthicus/fix-array…
…-args [flang] Fix passing parts of array as writeable argument
Configuration menu - View commit details
-
Copy full SHA for 4dd70e1 - Browse repository at this point
Copy the full SHA 4dd70e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb22fb4 - Browse repository at this point
Copy the full SHA eb22fb4View commit details -
Merge pull request flang-compiler#1060 from flang-compiler/jpr-name-l…
…ocal-equiv Use name of an equivalence member in local aggregate alloca
Configuration menu - View commit details
-
Copy full SHA for 90abadc - Browse repository at this point
Copy the full SHA 90abadcView commit details -
Process block data programs early (flang-compiler#1059)
Block data programs may initialize common block data, so process them in a preliminary pass (along with function declarations and module variables) to give them precedence over other common block declarations.
Configuration menu - View commit details
-
Copy full SHA for 51261bd - Browse repository at this point
Copy the full SHA 51261bdView commit details
Commits on Sep 16, 2021
-
Merge pull request flang-compiler#1055 from kiranchandramohan/critica…
…l_cherry_picks Cherry pick some patches required for supporting OpenMP critical construct
Configuration menu - View commit details
-
Copy full SHA for 0efc2ba - Browse repository at this point
Copy the full SHA 0efc2baView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb1ab87 - Browse repository at this point
Copy the full SHA bb1ab87View commit details -
Fix evaluation semantics of FORALL constructs per 10.2.4.2.4.
When lowering of FORALL was refactored to split the work between the bridge and array expression lowering, the individual statements in a forall construct body were no longer being lowered one at a time. These changes add back the proper lowering. Changes include: - Factoring the rhs array base analysis to be by statement. - Fix bug with finalization of context stack. - Fix bug with rerunning the analysis. - Merge aspects of cleanup code gen. - Restructure loop nest lowering such that each assignment resides in its own copy of a loop nest. - Add a lazy shape buffer. Thread lazy mask buffers through the loop nest so that cached results are available. - Regenerate checks for tests. - Fixes for p9. Make forall-2.f90 source file name independent. Fix for k6 test, among others. Using incorrect statement context. Fix bug exposed by m7. Fix m7 bug. review comments
Configuration menu - View commit details
-
Copy full SHA for 126aa69 - Browse repository at this point
Copy the full SHA 126aa69View commit details -
Merge pull request flang-compiler#1063 from schweitzpgi/ch-forall
Fix evaluation semantics of FORALL constructs per 10.2.4.2.4.
Configuration menu - View commit details
-
Copy full SHA for 2af3c27 - Browse repository at this point
Copy the full SHA 2af3c27View commit details
Commits on Sep 17, 2021
-
Fix shared library builds after flang-compiler#1061
The added pass works when mlir::LLVM::LLVMDialect, mlir::acc::OpenACCDialect, and mlir::omp::OpenMPDialect are present, which adds a dependency on those dialect libraries. https://github.com/flang-compiler/f18-llvm-project/blob/bb1ab876a5fec1eb3f2ab0603756f9124515a68a/flang/include/flang/Optimizer/Transforms/Passes.td#L189
Configuration menu - View commit details
-
Copy full SHA for ff9e169 - Browse repository at this point
Copy the full SHA ff9e169View commit details -
Lower IO input with vector subscripts
Define a VectorSubscriptBox class that allow representing and working with a lowered Designator containing vector subscripts while ensuring all the subscripts expression are only lowered once. It's a bit of a super ExtendedValue (but is is not added as such because it is heavy and its use case is only restricted to IO input so far). The key point of this class is that it has members functions `loopOverElements` and `loopOverElementsWhile` that allow creating loops over each element of the designator, and call a provided callback with the address of the element. This class is used in input IO to create an IO runtime call for each element of the designator, since it is not possible to build a descriptor for it. The `loopOverElementsWhile` version is required when error recovery is enabled in IO. A hidden VectorSubscriptBoxBuilder is in charge of making a custom Designator<T> visit and create the VectorSubscriptBox. Once this is done, the VectorSubscriptBox does not equire any front-end data structures to work with. The motivation for creating such tool is that the current lowering array lowering infrastructure is centered around assignment (to a variable or temporary), and could not be used here to created the loops over the IO runtime calls without some non trivial modification to it. Adding complexity to the array expression lowering framework to cover a corner case did not appear a good idea. The option of creating a temp, passing it to the runtime, and copying it back was explored, but it was not possible to guarantee that the subscript would be evaluated only once given there was no way to "keep the lowered representation" of the designator between the temp creation and the copy back (the temp creation requires evaluating the susbcripts to compute the shape in general). However, note that with the added VectorSubscriptBox, it would actually now also be possible to deploy a temp + copy back mechanism. This can be done later if it appeared beneficial in real world program. The only cases left TODOs are the cases when one of the Components is a parent type reference (not yet handled properly in the general case), the coarray case, and the PDT case (not sure exactly how type params will be threaded in fir.field_index). All other cases are covered, and I tried to add exhaustive tests since I do not expect real world program to be very harsh on this utility (most will just do READ(*, *) x(y)).
Configuration menu - View commit details
-
Copy full SHA for 753aef9 - Browse repository at this point
Copy the full SHA 753aef9View commit details -
Merge pull request flang-compiler#1057 from flang-compiler/jpr-vector…
…-io-2 Lower IO input with vector subscripts
Configuration menu - View commit details
-
Copy full SHA for 40d96d4 - Browse repository at this point
Copy the full SHA 40d96d4View commit details -
Changes so that temporaries do not use uniq_name.
Also fix some tests that were walls of CHECK-DAG checks.
Configuration menu - View commit details
-
Copy full SHA for 6286954 - Browse repository at this point
Copy the full SHA 6286954View commit details -
Merge pull request flang-compiler#1070 from schweitzpgi/ch-uniqname
Changes so that temporaries do not use uniq_name.
Configuration menu - View commit details
-
Copy full SHA for 76c6aa0 - Browse repository at this point
Copy the full SHA 76c6aa0View commit details
Commits on Sep 20, 2021
-
Fix lit tests after 1070 change.
- Some file name size made it into transfer.f90 test in flang-compiler#1070 test update through the fir.char<?,90> type. This makes the test dependent on where LLVM directory is. Replace fir.char<?,90> by fir.char<?,{{.*}}> - vector-subscript-io.f90 was not updated with the uniq_name -> bindc_name change in flang-compiler#1070.
Configuration menu - View commit details
-
Copy full SHA for 63130d8 - Browse repository at this point
Copy the full SHA 63130d8View commit details -
Lower elemental subroutine calls (outside of user assignment case)
Use the array lowering framework to lower elemental subroutine. This required: - Splitting the part of genIterSpace that creates the implicit loops into a new genImplicitLoops function. genIterspace deals with the destination and other explicit contexts set-ups that do not matter in the subroutine case (there is no destination). Other than having no destination, a big difference is that there is no threaded innerArg. genImplicitLoops handles this variation. - Fixing a bug in the iteration shape determination. The code was assuming there would always be at least one array_load, which is not true if there are only RefTransparent operands. This is always true in the subroutine case, but was actually also an issue for things like `print *, elem_func(array)` with the previous code (compile crash). Add a new ArrayOperands structure to keep track of what matters to later deduce the shape of the array expression instead of keeping track of array_loads for that purpose. - Elemental subroutine with intent(out)/intent(inout) arguments must be applied "in array element order" (15.8.3). It turns out this is also the case for impure elemental functions (10.1.4 p5). Instead of always creating loops as "unordered=true" add an unordered field to the ArrayExprLowering class. It is set to true by default, but will be set to false if any impure elemental function is lowered, or in case of intent(out)/intent(inout) arguments in elemental subroutines. - Last, instead of using createFirExpr to lowering subroutine calls, use a new createSubroutineCall that deals with the array/scalar dispatching. A TODO is added for the user defined elemental assignment, because overlap analysis between RHS/LHS must be done, and this require somehow plugging this special and very restricted case of elemental calls into the array_load/array_update/array_merge framework or some ad-hoc lowering.
Configuration menu - View commit details
-
Copy full SHA for 6227665 - Browse repository at this point
Copy the full SHA 6227665View commit details -
Merge pull request flang-compiler#1069 from flang-compiler/jpr-elem-s…
…ub-2 Lower elemental subroutine calls (outside of user assignment case)
Configuration menu - View commit details
-
Copy full SHA for 0b3fa79 - Browse repository at this point
Copy the full SHA 0b3fa79View commit details
Commits on Sep 23, 2021
-
[flang] Add runtime interface for NUM_IMAGES
NUM_IMAGES takes optional arguments TEAM and TEAM_NUMBER. This patch provides an interface for only the optional TEAM_NUMBER dummy argument. It is likely that a different function will be required to support TEAM arguments. Reviewed By: PeteSteinfeld, klausler Differential Revision: https://reviews.llvm.org/D109547
Configuration menu - View commit details
-
Copy full SHA for 72f2ed3 - Browse repository at this point
Copy the full SHA 72f2ed3View commit details
Commits on Sep 24, 2021
-
[flang] NUM_IMAGES(TEAM_NUMBER) runtime implementation
This commit provides a single-image implementation of NUM_IMAGES. It returns 1.
Configuration menu - View commit details
-
Copy full SHA for 3d2f9d0 - Browse repository at this point
Copy the full SHA 3d2f9d0View commit details