[PATCH] D113665: [flang] Add a test case for `fir.dt_entry`

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 05:39:53 PST 2021


kiranchandramohan added inline comments.


================
Comment at: flang/test/Fir/convert-to-llvm-invalid.fir:37
+// expected-error at +1{{failed to legalize operation 'fir.dt_entry'}}
+fir.dt_entry "method", @method_impl
----------------
I think @clementval was suggesting that dt_entry should always. come inside a dispatch_table. The fact that dt_entry can be written in module scope shows that it is missing some constraints.

I think dt_entry operation should have the HasParent constraint where the parent is the dispatch_table.

https://mlir.llvm.org/docs/Traits/#hasparent
https://github.com/llvm/llvm-project/blob/9534e361ea12aaecde52b8ac4c947f9a301d0c9b/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td#L155

I was thinking that the test was skipped because if it has the constraint maybe we never reach the conversion of dt_entry and hence the error is never produced.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113665



More information about the llvm-commits mailing list