Displaying 2 results from an estimated 2 matches for "optimaledgeprofcounters2".
Did you mean:
optimaledgeprofcounters
2009 Jun 18
0
[LLVMdev] Initialising global Array
...ant*>(NumEdges);
APInt zero(32,0); Constant* zeroc = ConstantInt::get(zero);
APInt minusone(32,-1); Constant* minusonec = ConstantInt::get(minusone);
GlobalVariable *Counters = new GlobalVariable(ATy, false,
GlobalValue::InternalLinkage, Constant::getNullValue(ATy),
"OptimalEdgeProfCounters2", &M);
Initializer[0] = zeroc;
Initializer[1] = minusonec;
Initializer[2] = minusonec;
Initializer[3] = zeroc;
Constant *init = llvm::ConstantArray::get(ATy, Initializer);
Counters->setInitializer(init);
DOUT << "Initializer:: \n";
for( int i = 0; i <...
2009 Jun 18
3
[LLVMdev] Initialising global Array
Hi,
I try to create a array that has a nonzero initialiser:
What i do is, first create the array type.
> const ArrayType *ATy = ArrayType::get(Type::Int32Ty, NumEdges);
Then create some constant values for the initializer.
> std::vector<Constant*> Initializer; Initializer.reserve(NumEdges);
> APInt zero(32,0); Constant* zeroc = ConstantInt::get(zero);
> APInt