[PATCH] D111288: [fir] Add data flow optimization pass

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 19:15:03 PDT 2021


mehdi_amini added inline comments.


================
Comment at: flang/test/Fir/memref-data-flow.fir:276
+
+func @forward_store3(%arg0: !fir.ref<!fir.array<?x?xi32>>, %arg1: !fir.ref<!fir.array<?x?xi32>>, %arg2: !fir.ref<!fir.array<?x?xi32>>, %arg3: !fir.ref<i32>, %arg4: !fir.ref<i32>) {
+  %c100_i32 = arith.constant 100 : i32
----------------
mehdi_amini wrote:
> awarzynski wrote:
> > mehdi_amini wrote:
> > > I still believe we should have documentation for the test itself: what is this IR exposing as a pattern and what it this testing that the other above don't?
> > > 
> > > This is quite a long function right now...
> > > what it this testing that the other above don't
> > 
> > IIUC, it is similar to the other tests. I don't think there's anything particular here beyond: there are some store-load chains, which are being removed. Wouldn't that be sufficient?
> > Wouldn't that be sufficient?
> 
> Not really: this isn't really a good way to write and design tests IMO.
> 
> Ideally I'd like the tests to look like this for example: https://github.com/llvm/llvm-project/blob/main/mlir/test/Transforms/loop-coalescing.mlir
> Note how every individual case is shared in a different function, and how documented they are in what they are actually testing.
> 
> 
> 
> 
(You can browse all the tests in this directory, or in MLIR in general, they should mostly look like this or have a similar overall form. I don't think you'll find any comparable to what is here)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111288/new/

https://reviews.llvm.org/D111288



More information about the llvm-commits mailing list