[flang-commits] [flang] [Flang][OpenMP] Make boxed procedure pass aware of OpenMP private ops (PR #118261)

via flang-commits flang-commits at lists.llvm.org
Mon Dec 2 01:57:37 PST 2024


https://github.com/jeanPerier commented:

Thanks Kiran. I wonder if the generic fix is not to remove the "op->getDialect() == firDialect" in the case just above. I do not recall the rational of limiting it to fir ops. Most likely this was an early compiler-perf optimization that was based on the wrong assumption that such FIR type would only be returned by FIR ops, but I see no harm removing that limitation (the `needsConversion` lookup cost should be pretty limited for most non FIR operation result types).

The right thing would likely to be to have a real dialect conversion pass, but these are expensive, so it may be better to keep the current approach for now (the next bag of issue I see would come from FIR type inside attributes of operations not handled here. There is [some work to make dialect conversion cheaper](https://discourse.llvm.org/t/rfc-a-new-one-shot-dialect-conversion-driver/79083) happening in MLIR, maybe we can revisit at that point).

https://github.com/llvm/llvm-project/pull/118261


More information about the flang-commits mailing list