jsjodin wrote:

> At the time I added `FloatTypeInterface`, we were also thinking about 
> `IntegerTypeInterface`, but we decided not to add it. I forgot the exact 
> reasoning.
> 
> Can you describe your use case in more detail? How do CIR and OpenMP ops 
> interact? How does the `IntLikeTypeInterface` help? Who are the users of 
> `IntLikeTypeInterface`? Would ops such as `scf.for`, `arith.addi`, etc. 
> eventually accept int-like types instead of just plain integers? Could the 
> interface be defined in CIR and attached to OpenMP ops via external model?

I created an RFC here so you may want to include your comments there:
https://discourse.llvm.org/t/rfc-add-intliketypeinterface-to-the-builtin-type-interfaces/90879
I cen duplicate this response there also. 
Anyway, the use case is some OpenMP operations take integers as inputs such as 
loop bounds or to specify the number of threads etc, and since the OpenMP 
dialect was only used in flang which uses the standard integer types everything 
worked fine. CIR however has its own types for integers, so then there is a 
type mismatch. There was already a pointer like type interface in OpenMP 
(because flang has a different type for pointers), which we reused for pointers 
in CIR. We could add an interface to the OpenMP dialect to handle intergers as 
well, but the argument is that we should go through the core interfaces to 
reduce dependencies between the dialects. PR #197946 was created to remove the 
OpenMP pointer interface and use the core one instead.

https://github.com/llvm/llvm-project/pull/196363
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to