RFC: How to inline Fortran inrinsics

It’s not just intrinsic functions. See flang/docs/ArrayComposition.md.

1 Like

IIUC, the intent is to keep this optional for now. Because it’s an MLIR pass, it’s completely standalone and very non-intrusive (i.e. very easy to enable/disable).

We might discover that what you propose would be preferred/better/beneficial. But it’s hard to evaluate until we have something to experiment with.

Perhaps I’m stating the obvious, but no pass is standalone. This code depends on many parts of LLVM, and of those, MLIR and FIR change fairly often.

I’m sure what Andrzej means is that it’s standalone in the sense that it can be enabled/disabled independently of other passes that do other optimisations. For example, if there was a pass that does some optimization based on arrays size & shapes.

Clearly, the pass relies on MLIR pass infrastructure - there’s probably 50-100 “mlir::” in the code right now, and will not compile without FIR and LLVM infrastructure around it.

1 Like