|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
39377d52 |
| 01-Jul-2022 |
Valentin Clement <[email protected]> |
[flang] Fix APFloat conversion cases
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D128935
Co-author
[flang] Fix APFloat conversion cases
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D128935
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Peter Steinfeld <[email protected]>
show more ...
|
| #
10b23ae8 |
| 22-Jun-2022 |
Valentin Clement <[email protected]> |
[flang] Handle BINC(C) variables and add TODO for corner cases
- BIND(C) was ignored in lowering for objects (it can be used on module and common blocks): use the bind name as the fir.global name.
[flang] Handle BINC(C) variables and add TODO for corner cases
- BIND(C) was ignored in lowering for objects (it can be used on module and common blocks): use the bind name as the fir.global name.
- When an procedure is declared BIND(C) indirectly via an interface, it should have a BIND(C) name. This was not the case because GetBindName()/bindingName() return nothing in this case: detect this case in mangler.cpp and use the symbol name.
Add TODOs for corner cases:
- BIND(C) module variables may be initialized on the C side. This does not fit well with the current linkage strategy. Add a TODO until this is revisited.
- BIND(C) internal procedures should not have a binding label (see Fortran 2018 section 18.10.2 point 2), yet we currently lower them as if they were BIND(C) external procedure. I think this and the indirect interface case should really be handled by symbol.GetBindName instead of adding more logic in lowering to deal with this case: add a TODO.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D128340
Co-authored-by: Jean Perier <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
331145e6 |
| 20-Jun-2022 |
Valentin Clement <[email protected]> |
[flang][NFC] Unify todo messages
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D128186
Co-authored-by:
[flang][NFC] Unify todo messages
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D128186
Co-authored-by: Peter Steinfeld <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
5b66cc10 |
| 10-Jun-2022 |
Valentin Clement <[email protected]> |
[flang][NFC] Move Todo.h from Lower to Optimizer
Remove a backwards dependence from Optimizer -> Lower by moving Todo.h to the optimizer and out of lowering.
This patch is part of the upstreaming e
[flang][NFC] Move Todo.h from Lower to Optimizer
Remove a backwards dependence from Optimizer -> Lower by moving Todo.h to the optimizer and out of lowering.
This patch is part of the upstreaming effort from fir-dev branch.
Co-authored-by: Eric Schweitz <[email protected]>
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D127292
show more ...
|
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
| #
3d63d211 |
| 20-Apr-2022 |
Jean Perier <[email protected]> |
[flang] Do not pass derived type by descriptor when not needed
A missing "!" in the call interface lowering caused all derived type arguments without length parameters that require and explicit inte
[flang] Do not pass derived type by descriptor when not needed
A missing "!" in the call interface lowering caused all derived type arguments without length parameters that require and explicit interface to be passed via fir.box (runtime descriptor).
This was not the intent: there is no point passing a simple derived type scalars or explicit shapes by descriptor just because they have an attribute like TARGET. This would actually be problematic with existing code that is not always 100% compliant: some code implicitly calls procedures with TARGET dummy attributes (this is not something a compiler can enforce if the call and procedure definition are not in the same file).
Add a Scope::IsDerivedTypeWithLengthParameter to avoid passing derived types with only kind parameters by descriptor. There is no point, the callee knows about the kind parameter values.
Differential Revision: https://reviews.llvm.org/D123990
show more ...
|
| #
58ceae95 |
| 18-Apr-2022 |
River Riddle <[email protected]> |
[mlir:NFC] Remove the forward declaration of FuncOp in the mlir namespace
FuncOp has been moved to the `func` namespace for a little over a month, the using directive can be dropped now.
|
|
Revision tags: llvmorg-14.0.1 |
|
| #
fe252f8e |
| 22-Mar-2022 |
Valentin Clement <[email protected]> |
[flang] Lower boxed procedure
In FIR, we want to wrap function pointers in a special box known as a boxproc value. Fortran has a limited form of dynamic scoping [https://tinyurl.com/2p8v2hw7] betwee
[flang] Lower boxed procedure
In FIR, we want to wrap function pointers in a special box known as a boxproc value. Fortran has a limited form of dynamic scoping [https://tinyurl.com/2p8v2hw7] between "host procedures" and "internal procedures". There are a number of implementations possible.
Boxproc typed values abstract away the implementation details of when a function pointer can be passed directly (as a raw address) and when a function pointer has to account for the presence of a dynamic scope. When lowering Fortran syntax to FIR, all function pointers are emboxed as boxproc values.
When creating LLVM IR, we must strip away the abstraction and produce low-level LLVM "assembly" code. This patch implements that transformation as converting the boxproc values to either raw function pointers or executable trampolines on the stack as needed. The trampoline then captures the dynamic scope context within an executable thunk that can be passed instead of the function's raw address.
Some extra handling is required for Fortran functions that return a character value to deal with LEN values here.
Some of the code in Bridge.cpp and ConvertExpr.cpp and be re-arranged to faciliate the upstreaming effort.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D122223
Co-authored-by: mleair <[email protected]> Co-authored-by: Jean Perier <[email protected]> Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: V Donaldson <[email protected]> Co-authored-by: Kiran Chandramohan <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.0 |
|
| #
f5b29a7a |
| 14-Mar-2022 |
Valentin Clement <[email protected]> |
[flang][NFC] Add todo in CallInterface
Add a todo for assumed shape dummy argument with VALUE attribute since this is not implemented yet.
This patch is part of the upstreaming effort from fir-dev
[flang][NFC] Add todo in CallInterface
Add a todo for assumed shape dummy argument with VALUE attribute since this is not implemented yet.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D121581
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3 |
|
| #
589d51ea |
| 10-Mar-2022 |
Valentin Clement <[email protected]> |
[flang] Lower basic derived types
This patch lowers basic derived type to FIR.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision:
[flang] Lower basic derived types
This patch lowers basic derived type to FIR.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D121383
Co-authored-by: V Donaldson <[email protected]> Co-authored-by: Jean Perier <[email protected]> Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
092601d4 |
| 03-Mar-2022 |
Andrzej Warzynski <[email protected]> |
[flang] Remove 'using namespace mlir;` from header files
Currently, CGOps.h and FIROps.h contain `using namespace mlir;`. Every file that includes one of these header files (directly and transitivel
[flang] Remove 'using namespace mlir;` from header files
Currently, CGOps.h and FIROps.h contain `using namespace mlir;`. Every file that includes one of these header files (directly and transitively) will have the MLIR namespace enabled. With name-clashes within sub-projects (LLVM and MLIR, MLIR and Flang), this is not desired. Also, it is not possible to "un-use" a namespace once it is "used". Instead, we should try to limit `using namespace` to implementation files (i.e. *.cpp).
This patch removes `using namespace mlir;` from header files and adjusts other files accordingly. In header and TableGen files, extra namespace qualifier is added when referring to symbols defined in MLIR. Similar approach is adopted in source files that didn't require many changes. In files that would require a lot of changes, `using namespace mlir;` is added instead.
Differential Revision: https://reviews.llvm.org/D120897
show more ...
|
| #
764f95a8 |
| 07-Mar-2022 |
Valentin Clement <[email protected]> |
[flang] Add lowering for host association
This patches adds the code to handle host association for inner subroutines and functions.
This patch is part of the upstreaming effort from fir-dev branch
[flang] Add lowering for host association
This patches adds the code to handle host association for inner subroutines and functions.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D121134
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]> Co-authored-by: V Donaldson <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc2 |
|
| #
96d9df41 |
| 01-Mar-2022 |
Valentin Clement <[email protected]> |
[flang] Add test for allocatable on the callee side
This patch adds couple of tests for allocatable on the callee side. Lowering for some missing underlying features is added as well.
This patch is
[flang] Add test for allocatable on the callee side
This patch adds couple of tests for allocatable on the callee side. Lowering for some missing underlying features is added as well.
This patch is part of the upstreaming effort from fir-dev branch.
Depends on D120744
Reviewed By: PeteSteinfeld, schweitz
Differential Revision: https://reviews.llvm.org/D120746
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]> Co-authored-by: V Donaldson <[email protected]>
show more ...
|
| #
37e84d9b |
| 25-Feb-2022 |
Valentin Clement <[email protected]> |
[flang] Lower simple character return
Handles function with character return.
Character scalar results are passed as arguments in lowering so that an assumed length character function callee can ac
[flang] Lower simple character return
Handles function with character return.
Character scalar results are passed as arguments in lowering so that an assumed length character function callee can access the result length.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld, schweitz
Differential Revision: https://reviews.llvm.org/D120558
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]> Co-authored-by: V Donaldson <[email protected]>
show more ...
|
| #
f9704f0c |
| 24-Feb-2022 |
Valentin Clement <[email protected]> |
[flang] Simple array assignment lowering
This patch handles lowering of simple array assignment.
``` a(:) = 10 ```
or
``` a(1) = 1 ```
This patch is part of the upstreaming effort from fir-dev b
[flang] Simple array assignment lowering
This patch handles lowering of simple array assignment.
``` a(:) = 10 ```
or
``` a(1) = 1 ```
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld, schweitz
Differential Revision: https://reviews.llvm.org/D120501
Co-authored-by: Jean Perier <[email protected]> Co-authored-by: V Donaldson <[email protected]> Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
914061bb |
| 24-Feb-2022 |
Valentin Clement <[email protected]> |
[flang] Handle allocatable dummy arguments
This patch handles allocatable dummy argument lowering in function and subroutines.
This patch is part of the upstreaming effort from fir-dev branch.
Rev
[flang] Handle allocatable dummy arguments
This patch handles allocatable dummy argument lowering in function and subroutines.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: schweitz
Differential Revision: https://reviews.llvm.org/D120483
Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
d0b70a07 |
| 23-Feb-2022 |
Valentin Clement <[email protected]> |
[flang] Lower function and subroutine calls
This patch introduce basic function/subroutine calls. Because of the state of lowering only simple scalar arguments can be used in the calls. This will be
[flang] Lower function and subroutine calls
This patch introduce basic function/subroutine calls. Because of the state of lowering only simple scalar arguments can be used in the calls. This will be enhanced in follow up patches with arrays, allocatable, pointer ans so on.
``` subroutine sub1() end
subroutine sub2() call sub1() end ```
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: schweitz
Differential Revision: https://reviews.llvm.org/D120419
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]> Co-authored-by: V Donaldson <[email protected]>
show more ...
|
| #
da7c77b8 |
| 16-Feb-2022 |
Valentin Clement <[email protected]> |
[flang] Handle lowering arguments in subroutine and function
This patch adds infrsatrcutrue to be able to lower arguments in functions and subroutines.
This patch is part of the upstreaming effort
[flang] Handle lowering arguments in subroutine and function
This patch adds infrsatrcutrue to be able to lower arguments in functions and subroutines.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D119957
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
c807aa53 |
| 15-Feb-2022 |
Valentin Clement <[email protected]> |
[flang] Handle lowering of ranked array
This patch adds lowering of ranked array as function return.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
D
[flang] Handle lowering of ranked array
This patch adds lowering of ranked array as function return.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D119835
Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
ad40cc14 |
| 14-Feb-2022 |
Valentin Clement <[email protected]> |
[flang] Lower basic function with scalar integer/logical return value
This patch allows the lowring of simple empty function with a scalar integer or logical return value. The code in ConvertType.cp
[flang] Lower basic function with scalar integer/logical return value
This patch allows the lowring of simple empty function with a scalar integer or logical return value. The code in ConvertType.cpp is cleaned up as well. This file was landed together with the initial flang push and lowering was still a prototype at that time. Some more cleaning will come with follow up patches.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D119698
Co-authored-by: Jean Perier <[email protected]>
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
e1a12767 |
| 28-Jan-2022 |
Valentin Clement <[email protected]> |
[flang] Initial lowering for empty program
This patch enable lowering from Fortran to FIR for a basic empty program. It brings all the infrastructure needed for that. As discussed previously, this i
[flang] Initial lowering for empty program
This patch enable lowering from Fortran to FIR for a basic empty program. It brings all the infrastructure needed for that. As discussed previously, this is the first patch for lowering and follow up patches should be smaller.
With this patch we can lower the following code:
``` program basic end program ```
To a the FIR equivalent:
``` func @_QQmain() { return } ```
Follow up patch will add lowering of more complex constructs.
Reviewed By: kiranchandramohan, schweitz, PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D118436
show more ...
|