[PATCH] D113662: [fir] Add placeholder conversion pattern for disptach operations

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 04:35:49 PST 2021


clementval marked 3 inline comments as done.
clementval added inline comments.


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:376
+/// table.
+/// TODO: F2003 features.
+struct DispatchOpConversion : public FIROpConversion<fir::DispatchOp> {
----------------
awarzynski wrote:
> [nit] IMO, it would be helpful to mention F2003 in the `notifyMatchFailure` call. In fact, this comment can be replaced with with the message in `notifyMatchFailure`. That would be my preference. We tend to forget to update comments. Code forces us to update itself.
I just removed the todo. I prefer not adding the Fortran standard in the op since it can conver several standard version. I think message `not implemented yet` is enough. 


================
Comment at: flang/test/Fir/convert-to-llvm-invalid.fir:26
+
+// expected-error at +1{{failed to legalize operation 'fir.dispatch_table'}}
+fir.dispatch_table @dispatch_tbl {
----------------
awarzynski wrote:
> How about a diagnostic check for `fir.dt_entry`?
Not possible since `fir.dt_entry` cannot be standalone. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113662



More information about the llvm-commits mailing list