[llvm-dev] [Backend] What's the best way to convert br into br_ind

Yaotian Feng via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 4 23:39:49 PST 2020

I am currently writing a backend for a custom ISA. However, the jump and 
calls are all in the form of a Base + Offset. I have tried to use a 
Pseudo op and expand it in the /expandPostRAPseudoOp/ function, but that 
seems to be a bit too late. As I would need to def/use a register (I 
tried using regScavenger but since I also need do it in insert branch, 
and sometimes a MBB that I need to insert branch into has no instruction 
so regScavenger failed to iterate)

Is there any suggestions as of what is the proper way to do this if the 
target effectively has only indirect branch?

Here is the repository where I keep my code, if it helps.


Any help would be appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200305/71bfdaa0/attachment.html>

More information about the llvm-dev mailing list