search for: elementptrc

Displaying 3 results from an estimated 3 matches for "elementptrc".

Did you mean: elementptr
2011 May 18
2
[LLVMdev] access array problem
...lobalValue::InternalLinkage, Constant::getNullValue(ATy), "MemTraceCounters"); //get the index std::vector<Constant*>IndicesC(2); IndicesC[0] = Constant::getNullValue(Type::getInt32Ty(Context)); IndicesC[1] = ConstantInt::get(Type::getInt32Ty(Context),0); Constant *ElementPtrC = ConstantExpr::getGetElementPtr(CounterSize,&IndicesC[0],IndicesC.size()); Value *OldCounterSize =new LoadInst(ElementPtrC, "OldCounterSize", InsertPos); Value *OldCounterSize =new LoadInst(ElementPtrC, "", InsertPos); /...
2011 May 18
0
[LLVMdev] access array problem
Hi Guangming Tan, >>> GlobalVariable: >>> int *counter; //counter the number of load/store operations in run-time >>> int *counterArray; //record the load/store addresses >> strictly speaking these are not arrays, they are pointers. Also, you have >> written them in some kind of C-style idiom. What are the declarations in >> LLVM IR? > const Type
2011 May 18
2
[LLVMdev] access array problem
于 2011/5/18 14:29, Duncan Sands 写道: > Hi Tan Guangming, > >> I want to access an array in my instrumentation code. For example: >> >> GlobalVariable: >> int *counter; //counter the number of load/store operations in run-time >> int *counterArray; //record the load/store addresses > strictly speaking these are not arrays, they are pointers. Also, you have