Displaying 2 results from an estimated 2 matches for "arrayty_3".
2015 Mar 05
4
[LLVMdev] global variable
Hi all,
I am newbie for llvm.  I just create a global variable, there are some statements in my pass like:
    LoadInst* int64_64 = new LoadInst(pthreadPID, "", false, OptAplusOne);
    int64_64->setAlignment(8);
    int64_64->dump();
    LoadInst* int32_65 = new LoadInst(gvar_int32_myFlag, "", false, OptAplusOne);
    int32_65->setAlignment(4);
   
2011 Aug 19
1
[LLVMdev] LLVM: Very simple question
Hi, guys. I'm a newbie to LLVM and have a very simple question.
Which instructions should I use (in terms of IRBuilder calls) to allocate an
array of bytes in stack (alloca?), then to work with it (from a given
offset) as with integer (bitcast?). I mean something like that:
unsigned char var[8];
unsigned int offset = 3;
int val = *(int*)(&var+offset); /* read */
*(int*)(&var+offset)