[LLVMdev] Loop IR insertion

Qiuyu Zhang qiuyu at ucla.edu
Tue Jan 11 07:56:41 PST 2005


Hi,

I am trying to insert a Loop IR into the existed bytecode file. 

insertion part by C code,

char *p[n]; // pointer array for storing the address of strings
int i;
for(i=0;i<n;i++){

(p[i])[2] = (p[i])[2] ^ 0x27;

}

My questions are 

1. for local variable 'char *p[n]' , it is represented by IR as alloca ...., so could I insert local variable (pointer array) directly as same way as insert global variable or  I have to use new allocaInst to construct it.

2. from instructions.h, there are some instructions class, but could I insert Xor instruction? or could I insert all IR instruction as I want? if so, would you like to give me some hints or examples.

Thanks





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050111/f2dc51fa/attachment.html>


More information about the llvm-dev mailing list