| #
e6e7da55 |
| 10-Dec-2021 |
Andrzej Warzynski <[email protected]> |
[flang][nfc] Fix formatting
|
| #
75db341d |
| 17-Nov-2021 |
Andrzej Warzynski <[email protected]> |
[flang][codegen] Add a conversion for `!fir.coordinate_of` - part 1
This patch extends the `FIRToLLVMLowering` pass in Flang by adding a hook to transform `!fir.coordinate_of` into a sequence of LLV
[flang][codegen] Add a conversion for `!fir.coordinate_of` - part 1
This patch extends the `FIRToLLVMLowering` pass in Flang by adding a hook to transform `!fir.coordinate_of` into a sequence of LLVM MLIR instructions.
The following cases are currently supported: 1. the input object is a `!fir.complex` (wrapped in e.g. `!fir.ref` or `!fir.box`) 2. the input object is wrapped in a `!fir.box` (including e.g. `!fir.array`). Note that `!fir.complex` inside a `!fir.box` falls under case 1. above (i.e. it's a special case regardless of the wrapping type).
This is part of the upstreaming effort from the `!fir-dev` branch in [1].
Differential Revision: https://reviews.llvm.org/D114159
Co-authored-by: Jean Perier <[email protected]> Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: V Donaldson <[email protected]>
show more ...
|
| #
3012f35f |
| 09-Dec-2021 |
Jacques Pienaar <[email protected]> |
[flang] Updated FIR dialect to _Both
Change dialect (and remove now redundant accessors) to generate both form of accessors of being generated. Tried to keep this change reasonably minimal (this als
[flang] Updated FIR dialect to _Both
Change dialect (and remove now redundant accessors) to generate both form of accessors of being generated. Tried to keep this change reasonably minimal (this also includes keeping note about not generating getType accessor to avoid shadowing).
Differential Revision: https://reviews.llvm.org/D115420
show more ...
|
| #
c2acd453 |
| 02-Nov-2021 |
AlexisPerry <[email protected]> |
Convert fir.allocmem and fir.freemem operations to calls to malloc and free, respectively
This patch is part of the upstreaming effort from the fir-dev branch.
Address review comments - move CHECK
Convert fir.allocmem and fir.freemem operations to calls to malloc and free, respectively
This patch is part of the upstreaming effort from the fir-dev branch.
Address review comments - move CHECK blocks to after the mlir code in the test file - fix style with respect to anonymous namespaces: only include class definitions in the namespace and make functions static and outside the namespace - fix a few nits - remove TODO in favor of notifyMatchFailure - removed unnecessary CHECK line from convert-to-llvm.fir - rebase on main - add TODO back in - get successfull test of TODO in AllocMemOp converion of derived type with LEN params - clearer comments and reduced use of auto - move defintion of computeDerivedTypeSize to fix build error
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
Reviewed By: awarzynski, clementval, kiranchandramohan, schweitz
Differential Revision: https://reviews.llvm.org/D114104
show more ...
|
| #
fa517555 |
| 07-Dec-2021 |
Kiran Chandramohan <[email protected]> |
[Flang] Upstream conversion of the XRebox Op
The XRebox Op is formed by the codegen rewrite which makes it easier to convert the operation to LLVM. The XRebox op includes the information from the re
[Flang] Upstream conversion of the XRebox Op
The XRebox Op is formed by the codegen rewrite which makes it easier to convert the operation to LLVM. The XRebox op includes the information from the rebox op and the associated slice, shift, and shape ops.
During the conversion process a new descriptor is created for reboxing.
Co-authored-by: Jean Perier <[email protected]> Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Val Donaldson <[email protected]>
Reviewed By: clementval
Differential Revision: https://reviews.llvm.org/D114709
show more ...
|
| #
5d27abe6 |
| 06-Dec-2021 |
Valentin Clement <[email protected]> |
[fir] Add fircg.ext_array_coor conversion
This patch adds the conversion pattern for the fircg.ext_array_coor operation. It applies the address arithmetic on a dynamically shaped, shifted and/or sli
[fir] Add fircg.ext_array_coor conversion
This patch adds the conversion pattern for the fircg.ext_array_coor operation. It applies the address arithmetic on a dynamically shaped, shifted and/or sliced array.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D113968
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
1f551032 |
| 03-Dec-2021 |
Valentin Clement <[email protected]> |
[fir] Add fircg.ext_embox conversion
Convert a fircg.ext_embox operation to LLVM IR dialect. A fircg.ext_embox is converted to a sequence of operation that create, allocate if needed, and populate a
[fir] Add fircg.ext_embox conversion
Convert a fircg.ext_embox operation to LLVM IR dialect. A fircg.ext_embox is converted to a sequence of operation that create, allocate if needed, and populate a descriptor.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D114148
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
7ce8c6fc |
| 01-Dec-2021 |
Kiran Chandramohan <[email protected]> |
[Flang] Replace notifyMatchFailure with TODO hard failures
For unimplemented patterns we revert to using TODO hard failures instead of notifyMatchFailure.
For fir.select_type revert to using mlir::
[Flang] Replace notifyMatchFailure with TODO hard failures
For unimplemented patterns we revert to using TODO hard failures instead of notifyMatchFailure.
For fir.select_type revert to using mlir::emiterror. For the fir.embox TODO on a type with len params we cannot add a test since the type cannot be converted to llvm.
Adding negative tests using not and checking for the error message. TODO exits with an error in a build without assertion but aborts in a build with assertions. Abort requires using not with the --crash option. The two different usages of not is handled by using a custom command %not_todo_cmd which is converted to not or not --crash depending on the presence or absence of assertions. Using llvm-config to check the presence of assertions.
Reviewed By: clementval, awarzynski
Differential Revision: https://reviews.llvm.org/D114371
show more ...
|
| #
003c9c74 |
| 01-Dec-2021 |
Kiran Chandramohan <[email protected]> |
Revert "[Flang] Replace notifyMatchFailure with TODO hard failures"
This reverts commit 46fd7fd7b342039b59ec534bab8b93fa5d34f6e2.
|
| #
46fd7fd7 |
| 01-Dec-2021 |
Kiran Chandramohan <[email protected]> |
[Flang] Replace notifyMatchFailure with TODO hard failures
For unimplemented patterns we revert to using TODO hard failures instead of notifyMatchFailure.
For fir.select_type revert to using mlir::
[Flang] Replace notifyMatchFailure with TODO hard failures
For unimplemented patterns we revert to using TODO hard failures instead of notifyMatchFailure.
For fir.select_type revert to using mlir::emiterror. For the fir.embox TODO on a type with len params we cannot add a test since the type cannot be converted to llvm.
Adding negative tests using not and checking for the error message. TODO exits with an error in a build without assertion but aborts in a build with assertions. Abort requires using not with the --crash option. The two different usages of not is handled by using a custom command %not_todo_cmd which is converted to not or not --crash depending on the presence or absence of assertions. Using llvm-config to check the presence of assertions.
Reviewed By: clementval, awarzynski
Differential Revision: https://reviews.llvm.org/D114371
show more ...
|
| #
8ec0f221 |
| 23-Nov-2021 |
Mehdi Amini <[email protected]> |
Update fir.insert_on_range syntax to make the range more explicit (NFC)
Also replace ArrayAttr with IndexElementsAttr to model subscript dimensions. An array of attribute is a sparse inefficient sto
Update fir.insert_on_range syntax to make the range more explicit (NFC)
Also replace ArrayAttr with IndexElementsAttr to model subscript dimensions. An array of attribute is a sparse inefficient storage, with an API that requires to unpack/repack integers at every call site. Instead we can store dense array of integer as IndexElementsAttr.
Reviewed By: clementval, kiranchandramohan
Differential Revision: https://reviews.llvm.org/D112899
show more ...
|
| #
cdc476ab |
| 18-Nov-2021 |
Diana Picus <[email protected]> |
[fir] Set !fir.len_param_index conversion to unimplemented
This patch is part of the upstreaming effort from fir-dev.
The conversion of len_param_index in fir-dev is incomplete, so for now we're ma
[fir] Set !fir.len_param_index conversion to unimplemented
This patch is part of the upstreaming effort from fir-dev.
The conversion of len_param_index in fir-dev is incomplete, so for now we're marking this as unimplemented until we can settle on a design for the runtime support of LEN parameters.
Differential Revision: https://reviews.llvm.org/D114241
Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
b8207db7 |
| 19-Nov-2021 |
Valentin Clement <[email protected]> |
[fir] Add fir.no_reassoc conversion
Currently `fir.no_reassoc` is just removed in the conversion.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
[fir] Add fir.no_reassoc conversion
Currently `fir.no_reassoc` is just removed in the conversion.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D114154
Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
e6c66ef5 |
| 16-Nov-2021 |
Andrzej Warzynski <[email protected]> |
[flang][CodeGen] Transform `fir.field_index` to a sequence of LLVM MLIR
This patch extends the `FIRToLLVMLowering` pass in Flang by adding a hook to transform `fir.field_index` to a sequence of LLVM
[flang][CodeGen] Transform `fir.field_index` to a sequence of LLVM MLIR
This patch extends the `FIRToLLVMLowering` pass in Flang by adding a hook to transform `fir.field_index` to a sequence of LLVM MLIR instructions.
This is part of the upstreaming effort from the `fir-dev` branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project
Differential Revision: https://reviews.llvm.org/D113988
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
22d332a0 |
| 05-Nov-2021 |
Andrzej Warzynski <[email protected]> |
[flang][codegen] Add `fir.end` conversion placeholder
This patch extends the FIRToLLVMLowering pass in Flang by adding a hook to transform fir.end. This is just a placeholder for now as fir.end is n
[flang][codegen] Add `fir.end` conversion placeholder
This patch extends the FIRToLLVMLowering pass in Flang by adding a hook to transform fir.end. This is just a placeholder for now as fir.end is not required yet.
This is part of the upstreaming effort from the `fir-dev` branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project
Patch originally written by: Co-authored-by: Eric Schweitz <[email protected]>
Differential Revision: https://reviews.llvm.org/D113295
show more ...
|
| #
cc505c0b |
| 18-Nov-2021 |
Kiran Chandramohan <[email protected]> |
[Flang] Notify conversion failure for Proc ops, types
Add the FIR to LLVM conversion patterns for the BoxProcHostOp, EmboxProcOp, and UnboxProcOp ops and the boxproc type. These are currently unimpl
[Flang] Notify conversion failure for Proc ops, types
Add the FIR to LLVM conversion patterns for the BoxProcHostOp, EmboxProcOp, and UnboxProcOp ops and the boxproc type. These are currently unimplemented. Implementation will come at a later time when support for Fortran 2003 procedure pointer feature is added.
Reviewed By: clementval, rovka
Differential Revision: https://reviews.llvm.org/D113879
Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
af6ee580 |
| 18-Nov-2021 |
Valentin Clement <[email protected]> |
[fir] Add fir.embox conversion
Convert a `fir.embox` operation to LLVM IR dialect. A `fir.embox` is converted to a sequence of operation that create, allocate if needed, and populate a descriptor.
[fir] Add fir.embox conversion
Convert a `fir.embox` operation to LLVM IR dialect. A `fir.embox` is converted to a sequence of operation that create, allocate if needed, and populate a descriptor.
Current limitiation: alignment is set by default but should be retrieved in the specific target.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan, awarzynski
Differential Revision: https://reviews.llvm.org/D113756
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
e81d73ed |
| 16-Nov-2021 |
Diana Picus <[email protected]> |
[fir] Add fir.constc conversion
Add the codegen for fir.constc.
This patch is part of the upstreaming effort from fir-dev.
Differential Revision: https://reviews.llvm.org/D114063
Co-authored-by:
[fir] Add fir.constc conversion
Add the codegen for fir.constc.
This patch is part of the upstreaming effort from fir-dev.
Differential Revision: https://reviews.llvm.org/D114063
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
e38ef2ff |
| 17-Nov-2021 |
Valentin Clement <[email protected]> |
[fir] Add fir.box_tdesc conversion
This patch adds the conversion pattern for `fir.box_tdes`.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
Diff
[fir] Add fir.box_tdesc conversion
This patch adds the conversion pattern for `fir.box_tdes`.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D113931
Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
1ed5a90f |
| 17-Nov-2021 |
Valentin Clement <[email protected]> |
[fir] Add conversion patterns for slice, shape, shapeshift and shift ops
The information in these perations is used by other operation. At this point they should not have anymore uses.
This patch i
[fir] Add conversion patterns for slice, shape, shapeshift and shift ops
The information in these perations is used by other operation. At this point they should not have anymore uses.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D113971
Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
1a2ec667 |
| 16-Nov-2021 |
Valentin Clement <[email protected]> |
[fir] Add fir.string_lit conversion
This patch adds the conversion pattern for the fir.string_lit operation.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: awarzyns
[fir] Add fir.string_lit conversion
This patch adds the conversion pattern for the fir.string_lit operation.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D113992
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
6c3d7fd4 |
| 12-Nov-2021 |
Andrzej Warzynski <[email protected]> |
[flang][CodeGen] Transform `fir.boxchar_len` to a sequence of LLVM MLIR
This patch extends the `FIRToLLVMLowering` pass in Flang by adding a hook to transform `fir.boxchar_len` to a sequence of LLVM
[flang][CodeGen] Transform `fir.boxchar_len` to a sequence of LLVM MLIR
This patch extends the `FIRToLLVMLowering` pass in Flang by adding a hook to transform `fir.boxchar_len` to a sequence of LLVM MLIR instructions.
This is part of the upstreaming effort from the `fir-dev` branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project
Differential Revision: https://reviews.llvm.org/D113763
Originally written by: Co-authored-by: Eric Schweitz <[email protected]>
show more ...
|
| #
31246187 |
| 16-Nov-2021 |
Valentin Clement <[email protected]> |
[fir] Add fir.gentypedesc conversion
Add conversion pattern for the GenTypeDescOp. Convert to a global constant with an addressof.
This patch is part of the upstreaming effort from fir-dev branch.
[fir] Add fir.gentypedesc conversion
Add conversion pattern for the GenTypeDescOp. Convert to a global constant with an addressof.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D113766
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
f1dfc027 |
| 16-Nov-2021 |
Diana Picus <[email protected]> |
[fir] Add fir.cmpc conversion
This patch adds the codegen for fir.cmpc. The real and imaginary parts are extracted and compared separately. For the .EQ. predicate the results are AND'd, for the .NE.
[fir] Add fir.cmpc conversion
This patch adds the codegen for fir.cmpc. The real and imaginary parts are extracted and compared separately. For the .EQ. predicate the results are AND'd, for the .NE. predicate the results are OR'd, and for other predicates we keep only the result on the real parts.
This patch is part of the upstreaming effort from fir-dev.
Differential Revision: https://reviews.llvm.org/D113976
Co-authored-by: Eric Schweitz <[email protected]> Co-authored-by: Jean Perier <[email protected]>
show more ...
|
| #
677df8c7 |
| 15-Nov-2021 |
Valentin Clement <[email protected]> |
[fir] Add fir.global_len conversion placeholder
As for D113662, this patch just add a place holder for the fir.global_len operation conversion. This operation is part of F20xx and is not implemented
[fir] Add fir.global_len conversion placeholder
As for D113662, this patch just add a place holder for the fir.global_len operation conversion. This operation is part of F20xx and is not implemented yet.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D113887
show more ...
|