xlauko wrote: > > I would think of `UnrealizedConversionCastOps` surviving multiple steps not > > really idomatic, they are meant to just note "here is some conversion that > > needs to be hadeled later in this pass", ideally in between passes you > > sould have IR that has some expected form. > > On the other hand why `OpenMP_IntLikeTypeInterface` and not introducing > > this to core mlir similarly to floats and pointers? Then arbitrary consumer > > of CIR can use the interface not just OpenMP. > > Also present solution would require attaching `OpenMP_IntLikeTypeInterface` > > to CIR types which creates not nice dependency direction in my opinion. > > Do you mean there should be Pointer/Int/Float-like interfaces in core MLIR > that both OMP and CIR could refer to? It seems like a doable solution > depending on how difficult it would be to agree in what should be in those > interfaces. In the OMP-specific interfaces we can choose what is relevant for > those types and makes it clear what CIR needs to provide to be an input to > OMP operations. IMO the dependency on CIR->OMP isn't too bad in the sense > that CIR is the base language and essentially imports OMP. We have a > precedent with flang/FIR already, although that particular point may not be a > good argument if that is a poor design choice.
Yes, I just realised, OMP uses custom ones also for pointers and floats. I thought it is using core MLIR's `PtrLikeTypeInterface` and `FloatTypeInterface` see (https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/IR/BuiltinTypeInterfaces.td). Only IntegerTypeInterface is missing there. I would suggest making an RFC for this addition. What I don't like about CIR->OMP dependency is that it will converge to similar pattern for other consumers, and suddenly you have OpenMP_IntLikeTypeInterface, OpenACC_IntLikeTypeInterface, MyCustom_IntLikeTypeInterface all representing the same fact. https://github.com/llvm/llvm-project/pull/196363 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
