search for: memtracecounters

Displaying 5 results from an estimated 5 matches for "memtracecounters".

2011 May 18
2
[LLVMdev] access array problem
...at are the declarations in > LLVM IR? const Type *IntTy = Type::getInt32Ty(M.getContext()); const Type *ATyC = ArrayType::get(Type::getInt64Ty(M.getContext()), 1); GlobalVariable *CounterSize = new GlobalVariable(M, ATyC, false, GlobalValue::InternalLinkage, Constant::getNullValue(ATyC), "MemTraceCounterSize"); const Type *ATy = ArrayType::get(Type::getInt32Ty(M.getContext()), 3000); GlobalVariable *Counters = new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage, Constant::getNullValue(ATy), "MemTraceCounters"); >> //increase the counter if a load/store is performed...
2011 May 18
0
[LLVMdev] access array problem
...gt; LLVM IR? > const Type *IntTy = Type::getInt32Ty(M.getContext()); > const Type *ATyC = ArrayType::get(Type::getInt64Ty(M.getContext()), 1); > > GlobalVariable *CounterSize = new GlobalVariable(M, ATyC, false, > GlobalValue::InternalLinkage, > Constant::getNullValue(ATyC), "MemTraceCounterSize"); so CounterSize is an array of length 1, containing a single 64 bit integer. Using an array seems rather pointless here. > > const Type *ATy = ArrayType::get(Type::getInt32Ty(M.getContext()), 3000); > GlobalVariable *Counters = new GlobalVariable(M, ATy, false, > GlobalValue...
2011 May 18
2
[LLVMdev] access array problem
...y = Type::getInt32Ty(M.getContext()); const Type *ATyC = ArrayType::get(Type::getInt64Ty(M.getContext()), 1); GlobalVariable *CounterSize = new GlobalVariable(M, ATyC, false, GlobalValue::InternalLinkage, Constant::getNullValue(ATyC), "MemTraceCounterSize"); const Type *ATy = ArrayType::get(Type::getInt32Ty(M.getContext()), 3000); GlobalVariable *Counters = new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage, Constant::getNullValue(ATy), "MemTraceCounters"); //get the index std::vector<Constant*&gt...
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
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] =