[llvm-dev] Replace "ret" with "pop+jump"

PenYiWang via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 8 20:23:15 PDT 2018


Hi

I want to replace all the return instructions in the program with pop
<reg>; jmp <reg>.

Should I use  IRBuilder in LLVM IR level?

I found that there is a IRBuilder::CreateIndirectBr

Or Should I modify the code in lib/Target/X86/X86ISelLowering.cpp in
backend ?

I found that there is a X86TargetLowering::LowerCall

Which is better?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180809/d4693cb8/attachment.html>


More information about the llvm-dev mailing list