Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1454–1460 | Remove commented code? |
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1460 | Why is this removed? |
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1460 | Oh right I forgot to update this: this builder seems conceptually broken to me. I'll pull this in another revision and rebase the current one though. |
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1464 | Thanks, good catch :) |
LGTM. Looks like a good syntax improvement. Also seems to match the example given in https://github.com/llvm/llvm-project/blob/bcad20bc6591c8b503923402038c735a77373f99/flang/include/flang/Optimizer/Dialect/FIROps.td#L2003.
I have a Nit suggestion.
Please wait for @clementval/@schweitz.
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1445 | Nit: The fortran array syntax uses Paren. Might be good to use that. Not a strong opinion. You can wait for other's comments. |
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1445 | Happy to adjust as needed! Something that would be nice to clarify in a doc for the FIR dialect in general are some principles around row/col major and whether indexing starts at 0 or 1, I'm frequently confused. |
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1445 |
Thinking about it, I would likely try be to consistently using ( ) for Fortran indexing (col-major, starts at 1) and square brackets for the C-like indexing. |
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1445 | That sounds good to me. I can help with submitting this to fir-dev. |
BTW @mehdi_amini, is there a way to put up the FIR dialect operations on a webpage just like the MLIR dialects (https://mlir.llvm.org/docs/Dialects/SCFDialect/)?
flang/lib/Optimizer/Dialect/FIROps.cpp | ||
---|---|---|
1445 | +1 to use Fortran syntax. |
Thanks Mehdi for this patch. We welcome changes that improve the readability of the code. Could you consider delaying these kind patches till we have finished upstreaming most of the changes, so as to avoid additional effort to merge this back into fir-dev.
Kiran as volunteered to merge this back to fir-dev now.
flang/include/flang/Optimizer/Dialect/FIROps.td | ||
---|---|---|
2002 | Actually this change should likely be separated in another revision from the ASM syntax one. |
@mehdi_amini This comment was mainly for any further syntax change in the dialect. This one can go in anytime.
@mehdi_amini This comment was mainly for any further syntax change in the dialect. This one can go in anytime.
Ah ok, pushing now then.
flang/include/flang/Optimizer/Dialect/FIROps.td | ||
---|---|---|
2002 | It's too annoying to split up because IndexElementsAttr can't be parsed alone by default, I'll minimize the churn and land this together this time. |
Actually this change should likely be separated in another revision from the ASM syntax one.