Added MLIR support for translating use_device_ptr and use_device_addr clauses for LLVMIR lowering.
- use_device_ptr: The mapped variables marked with use_device_ptr are accessed through a copy of the base pointer mappers. The mapper is copied onto a new temporary pointer variable.
- use_device_addr: The mapped variables marked with use_device_addr are accessed directly through the base pointer mappers.
- If mapping information is not provided explicitly then default map_type of alloc/release is assumed and the map_size is set to 0.
Depends on D152554
use_dev_ptr operands must always be pointer types so I think it is safe to always just create a ptr for them.
However if we want to support typed pointers then we would have to create something like:
Builder.CreateAlloca(UseDeviceOp.first->getType()->getPointerElementType())
This is not possible as getPointerElementType is deprecated and I couldn't find any alternative for this.