[LLVMdev] instructions copy

Yuxi Chen chenyuxi at uchicago.edu
Sat Jul 11 16:13:16 PDT 2015


Hi,

I want to copy some dependent statements, like a = b, b = c, from one basicblock to another basicblocks.
Because of SSA, a = b, will be like %1 = load %b, store %1, %a.
If I just use clone() method in Instruction class, it will be like <badref> = load %b, store <badref>, %a.
If I need remap the virtual registers, this map just will affect the whole module? And how to use it? I am a bit confused.

Any suggestion will be appreciated.

Best,
Yuxi
Uchicago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150711/6e11f71a/attachment.html>


More information about the llvm-dev mailing list