By default LLVM generates BL instruction for external calls. For my purpose I need to generate sequence of MOVK and BLR instruction for later patching with custom linker. I also need to insert certain instructions before and after each such call.
Maybe I need to add custom instruction selection pass?
Is there any way I can do this without modifying LLVM?