llvm-project/flang/test/Fir
Valentin Clement e7361469bb
[fir] Add fir.array_amend operation definition
This patch adds the fir.array_amend operation. this op
is used later in upstreaming patches for the F95 compliance.

The `array_amend` operation marks an array value as having been changed via
a reference obtain by an `array_access`. It acts as a logical transaction
log that is used to merge the final result back with an `array_merge_store`
operation.

 ```mlir
  // fetch the value of one of the array value's elements
  %1 = fir.array_access %v, %i, %j : (!fir.array<?x?xT>, index, index) -> !fir.ref<T>
  // modify the element by storing data using %1 as a reference
  %2 = ... %1 ...
  // mark the array value
  %new_v = fir.array_amend %v, %2 : (!fir.array<?x?xT>, !fir.ref<T>) -> !fir.array<?x?xT>
```

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: kiranchandramohan, schweitz

Differential Revision: https://reviews.llvm.org/D112448

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
2022-02-03 15:04:35 +01:00
..
Todo [flang][codegen] Add a conversion for `fir.coordinate_of` - part 2 2021-12-17 10:34:57 +00:00
abstract-results.fir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
affine-demotion.fir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
affine-promotion.fir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
array-value-copy.fir Fix flang tests after MLIR changes on the handling of declarative assembly 2021-12-08 04:31:12 +00:00
basic-program.fir [flang] Update tco tool pipline and add translation to LLVM IR 2022-01-24 14:16:27 +01:00
cg-ops.fir [fir] Add substr information to fircg.ext_embox and fircg.ext_rebox operations 2021-11-03 10:15:10 +01:00
char-conversion.fir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
convert-fold.fir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
convert-to-llvm-invalid.fir [flang][codegen] Add a conversion for `fir.coordinate_of` - part 2 2021-12-17 10:34:57 +00:00
convert-to-llvm-target.fir [flang][CodeGen] Transform `fir.boxchar_len` to a sequence of LLVM MLIR 2021-11-16 13:49:23 +00:00
convert-to-llvm.fir [flang] Update the description of `!fir.coordinate_of` 2022-01-24 10:45:52 +00:00
external-mangling-emboxproc.fir [fir] Add external name interop pass 2021-10-05 20:33:41 +02:00
external-mangling.fir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
fir-ops.fir [fir] Add fir.array_amend operation definition 2022-02-03 15:04:35 +01:00
fir-types.fir [Flang] Add the FIR LLVMPointer Type 2021-11-15 15:57:59 +00:00
invalid-types.fir [flang][fir] Add FIR Types parser diagnostic tests + cleanup 2021-03-05 14:58:44 -05:00
invalid.fir [fir] Add fir.array_access op 2022-02-03 11:45:27 +01:00
loop01.fir [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
loop02.fir [mlir] Move SelectOp from Standard to Arithmetic 2022-02-02 14:45:12 -08:00
memory-allocation-opt.fir Add a new memory allocation rewrite pass. 2021-12-15 15:45:08 -08:00
memref-data-flow.fir [fir] Add data flow optimization pass 2021-11-29 11:00:09 +01:00
recursive-type.fir [Flang] Enable support for conversion of recursive record types 2022-01-04 13:53:58 +00:00
target-rewrite-boxchar.fir [fir] TargetRewrite: Rewrite fir.address_of(func) 2021-12-03 10:56:24 +00:00
target-rewrite-char-proc.fir [flang] split character procedure arguments in target-rewrite pass 2022-01-27 16:29:37 +01:00
target-rewrite-complex.fir [flang] Add missing LABEL in test. NFC 2021-12-03 10:56:24 +00:00
target-rewrite-triple.fir [flang] Add TargetRewrite pass 2021-11-09 07:57:31 +00:00
types-to-llvm.fir [flang][optimizer] support aggregate types inside tuple and record type 2022-02-02 09:22:11 +01:00