[LLVMdev] Create Instruction
Михаил
neonomaly.x at gmail.com
Sun Apr 1 03:30:33 PDT 2012
Hi!
I've have Instruction in my code:
...
%call6 = call i32 %9(%class.A* %call3, i32 2)
...
And I want to get something like this:
...
%11 = icmp eq i32 (%class.D*, i32)* %10, @_ZThn4_N1D1xEi
br i1 %11, label %12, label %14
; <label>:12 ; preds = %7
%13 = bitcast %class.A* %call3 to %class.D*
%call64 = call i32 @_ZThn4_N1D1xEi(%class.D* %13, i32 2) // this one should be called instead of original in true-block of icmp
br label %15
; <label>:14 ; preds = %7
%call6 = call i32 %9(%class.A* %call3, i32 2) // this is my instruction
br label %15
; <label>:15 ; preds = %12, %14
....
The problem is that results of instructions have different names (%call6, %call64). I create new CallInst by CallInst::Create(F1,args,CS.getInstruction()->getName(), rightCall); , where CS - original call site, but new Instruction still haven't same name, but similar as I see....
It is possible to give exactly same name for result if CallInst in my case? Thanks!
Yours sincerely,
Kadysev Mikhail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120401/b48fdf52/attachment.html>
More information about the llvm-dev
mailing list