Unsupported ISD node in backend

Hi all,

I have a backend that does not support address space casting, and I would like it to tell the user that he cannot do a cast of pointer of different address space.
But I don’t know where and how I should do it. At the moment I have a “report_fatal_error” in the “Select” function of ISelDagToDag, but as so I’m not able to give the file and line where the error is. And without it, it’s a bit tricky for the user to find his error.
It is possible to implement this behavior, where and how?

Thanks,
Romaric

Hi all,

I have a backend that does not support address space casting, and I would like it to tell the user that he cannot do a cast of pointer of different address space.
But I don't know where and how I should do it. At the moment I have a "report_fatal_error" in the "Select" function of ISelDagToDag, but as so I'm not able to give the file and line where the error is. And without it, it's a bit tricky for the user to find his error.
It is possible to implement this behavior, where and how?

Here is an example of the AMDGPU backend doing something similar to what you want:

https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp#L444

-Tom