Displaying 6 results from an estimated 6 matches for "bkp_memory".
2011 May 16
2
[LLVMdev] dyn_cast<Instruction *> returns NULL where it should return a valid instruction
I have the following prototype for a function:
void bkp_memory(char *, int);
Inside my LLVM IR, I have a callsite looks like the following:
tail call void @bkp_memory(i8* bitcast (i32** @P to i8*), i32 4) nounwind
When I try to obtain its 1st argument and check whether it is a valid
instruction, using:
Instruction *Inst = dyn_cast<Instruction *>(I-...
2011 May 16
0
[LLVMdev] dyn_cast<Instruction *> returns NULL where it should return a valid instruction
On 5/16/11 9:35 AM, Chuck Zhao wrote:
> I have the following prototype for a function:
> void bkp_memory(char *, int);
>
> Inside my LLVM IR, I have a callsite looks like the following:
> tail call void @bkp_memory(i8* bitcast (i32** @P to i8*), i32 4) nounwind
>
>
> When I try to obtain its 1st argument and check whether it is a valid
> instruction, using:
> Instruction *Inst...
2011 May 04
2
[LLVMdev] identifying all dependent instructions through multi-levels of def-use relationship
...= alloca i32, align 4
%e = alloca i32, align 4
%f = alloca i32, align 4
%A = alloca [100 x i32], align 4
call void @start_ckpt() nounwind
%0 = call i32 @puts(i8* getelementptr inbounds ([8 x i8]* @.str, i32
0, i32 0)) nounwind
%a1 = bitcast i32* %a to i8* ; [1]
call void @bkp_memory(i8* %a1, i32 4) nounwind ; [2] the
function call instruction that I am about to replicate
I need to make a copy/clone of the call instruction [2]. However,
I->clone() failed on [2], because [2] has dependency chained
instructions that all will need to be cloned before itself can....
2011 May 05
0
[LLVMdev] identifying all dependent instructions through multi-levels of def-use relationship
...alloca i32, align 4
> %f = alloca i32, align 4
> %A = alloca [100 x i32], align 4
> call void @start_ckpt() nounwind
> %0 = call i32 @puts(i8* getelementptr inbounds ([8 x i8]* @.str, i32
> 0, i32 0)) nounwind
> %a1 = bitcast i32* %a to i8* ; [1]
> call void @bkp_memory(i8* %a1, i32 4) nounwind ; [2] the
> function call instruction that I am about to replicate
>
> I need to make a copy/clone of the call instruction [2]. However,
> I->clone() failed on [2], because [2] has dependency chained
> instructions that all will need to be cl...
2011 May 09
2
[LLVMdev] <badref> showed up when duplicating a list of dependent instructions
...= and i32 %89, 32736
7 %94 = zext i8 %93 to i32
8 %95 = xor i32 %94, %.masked
9 %.sum73 = or i32 %95, 32768
10 %104 = getelementptr inbounds [65536 x i16]* @prev, i32 0, i32 %.sum73
11 %take_addr2 = getelementptr i16* %104
12 %105 = bitcast i16* %take_addr2 to i8*
13 call void @bkp_memory(i8* %105, i32 2)
{basically, I want to duplicate the bkp_memory() call, everything else
are its dependent instructions.}
I put them into a std::vector<Instruction *> coll, with the following
code trying to do the replication and insertion:
std::vector<Instruction *>::iterator p;
In...
2011 May 09
0
[LLVMdev] <badref> showed up when duplicating a list of dependent instructions
...xor i32<badref>, %.masked
> %.sum73 = or i32<badref>, 32768
> <badref> = getelementptr inbounds [65536 x i16]* @prev, i32 0, i32 %.sum73
> %take_addr2 = getelementptr i16*<badref>
> <badref> = bitcast i16* %take_addr2 to i8*
> call void @bkp_memory(i8*<badref>, i32 2)
> Instruction does not dominate all uses!
> %95 = add i32 %93, 2
> %90 = getelementptr inbounds [65536 x i8]* @window, i32 0, i32 %95
> Instruction does not dominate all uses!
> %97 = getelementptr inbounds [65536 x i8]* @window, i32 0, i32 %95
>...