[LLVMdev] create instruction after specified instruction
Vasileios Koutsoumpos
bill_koutsoumpos at hotmail.com
Thu Jun 5 02:55:18 PDT 2014
Hello,
What I want to do is to locate a specific instruction and then create my
own instructions. I am able to locate the instruction I want, however,
when I want to create the new instructions I can place them before the
specified one or at the end of the basic block.
for example, I have the following IR code:
%9 = add nsw i32 %8, 2
store i32 %9, i32* %x, align 4
I want to insert some instructions between the add and the store
instructions.
I have tried the IRBuilder and the BinaryOperator::Create, but I cannot
create what I want.
Any suggestions?
Regards,
Vasileios
More information about the llvm-dev
mailing list