Displaying 5 results from an estimated 5 matches for "counterarray".
2011 May 18
3
[LLVMdev] access array problem
Hi,
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
//increase the counter if a load/store is performed
std::vector<Constant *>index(2);
index[0] = Constant::getNullvalue(Type:getInt32Ty(Context));
index[1] = Constant::get(Type::getInt32Ty(Context), 0);
Constant *ElementPtr = ConstantExpr::getGetElementPtr(c...
2011 May 18
0
[LLVMdev] access array problem
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
written them in some kind of C-style idiom. What are the declarations in
LLVM IR?
> //increase the counter if a load/store is performed
> std::vector<Constant *>index(2);
>...
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
> written them in some kind of C-style idiom. What are the declarations in
> LLVM IR?
const Type *IntTy = Type::getInt32Ty(M.getContext());
const Type *ATyC = ArrayType::get(Typ...
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 *IntTy = Type::getInt32Ty(M.getContext());
> const Type *ATy...
2011 May 18
2
[LLVMdev] access array problem
...rInst::Create(Counters, new_idx.begin(),
new_idx.end(), "", InsertPos);
Thanks!
? 2011/5/18 16:04, Duncan Sands ??:
> 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 *IntTy = Type::getInt32Ty(M.getContext());
>...