[llvm-dev] Replace "ret" with "pop+jump"
mayuyu.io via llvm-dev
llvm-dev at lists.llvm.org
Wed Aug 8 20:31:44 PDT 2018
IndirectBr only works for Branch instructions, not ret.
The latter one seems likely however I’m no where near a backend expert so I could be wrong : (
Zhang
> 在 2018年8月9日,11:23,PenYiWang via llvm-dev <llvm-dev at lists.llvm.org> 写道:
>
> 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
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list