[llvm-dev] Unsupported ISD node in backend

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] Unsupported ISD node in backend

Peter Smith via llvm-dev
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

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Unsupported ISD node in backend

Peter Smith via llvm-dev
On 05/21/2019 12:46 AM, Romaric Jodin via llvm-dev wrote:
> 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

> Thanks,
> Romaric
>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev