[Mlir-commits] [flang] [mlir] [flang] Added OperationMoveOpInterface for controlling LICM. (PR #175108)
Slava Zakharin
llvmlistbot at llvm.org
Wed Jan 14 17:24:07 PST 2026
vzakhari wrote:
I have been thinking more about this.
It seems that introducing such an interface in core MLIR will be to intrusive, since its presence means many passes will have to check this interface. I think even the simplest MLIR building blocks like folders will be affected. For example:
```
%0 = def
%1 = insertvalue poison, def, 0
region-op clause(%1) {
%2 = extractvalue %1, 0
use %2
}
```
Let's assume that the `region-op` wants only `%1` to be a live-in, then the folder of ExtractValueOp cannot do this:
```
%0 = def
%1 = insertvalue poison, def, 0
region-op clause(%1) {
use %0
}
```
So it seems to me that some operations of the OpenACC/MP dialects just cannot handle general MLIR optimizations, and probably have to be redesigned.
I am planning to merge this so that I can experiment with Flang LICM more, but I think we need to discuss how to adjust the acc/omp operations so that any optimization passes can be run on them.
https://github.com/llvm/llvm-project/pull/175108
More information about the Mlir-commits
mailing list