Displaying 5 results from an estimated 5 matches for "pointerty_1".
2012 Jun 17
3
[LLVMdev] BlockAddress instruction is copied instead of cloned during module link?
...lobalContext());
  mod->setDataLayout("e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64");
  mod->setTargetTriple("x86_64-unknown-freebsd8.2");
  // Type Definitions
  PointerType* PointerTy_1 = 
PointerType::get(IntegerType::get(mod->getContext(), 8), 0);
  ArrayType* ArrayTy_0 = ArrayType::get(PointerTy_1, 3);
  PointerType* PointerTy_2 = PointerType::get(ArrayTy_0, 0);
  std::vector<Type*>FuncTy_3_args;
  FuncTy_3_args.push_back(IntegerType::get(mod->getContext(), 32));...
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)
2014 Mar 29
2
[LLVMdev] Cast specific pointer type to generic one
Hi,
 
Suppose I have a pointer to "something" (a structure I defined) and I want
to pass the pointer to a generic function, that gets a 64-bit address
pointer.
How do I do that?
 
For instance:
The function is:
void Foo (void *);
I get the specific pointer using getPointerOperand() on a store instruction
that store to it:
inst->getPointerOperand()->getType()
 
Now I want
2008 Jun 28
0
[LLVMdev] need to store the address of a variable
..."llc -march=cpp arndt.bc -f -o -" to see the C++ code that 
constructs the module from the input bytecode. In your case, the 
relevant section looks like this:
AllocaInst* ptr_a_addr = new AllocaInst(IntegerType::get(32), "a_addr", 
label_4);
AllocaInst* ptr_d = new AllocaInst(PointerTy_1, "d", label_4);
StoreInst* void_5 = new StoreInst(int32_a /* argument %a */, ptr_a_addr, 
false, label_4);
StoreInst* void_6 = new StoreInst(ptr_a_addr, ptr_d, false, label_4);
void_5 is putting the argument %a into the locally allocated %a_addr.
void_6 is taking %a_addr and storing it i...
2008 Jun 28
2
[LLVMdev] need to store the address of a variable
Hello everybody,
my problem is, that  I want to get an array of pointers to all local variables 
in a function. This array will be used for transfering these Variables to 
another execution engine. 
I've code which generates this array, and a pointer to the target field of the 
array.
name = variables.fname + "_pointerArray";
Instruction* pointerArray = new