Displaying 4 results from an estimated 4 matches for "optimaledgeprofcount".
2009 Jun 18
3
[LLVMdev] Initialising global Array
...> APInt minusone(32,-1); Constant* minusonec = ConstantInt::get(minusone);
Create the global array, there is no initializer yet.
> GlobalVariable *Counters =
> new GlobalVariable(ATy, false, GlobalValue::InternalLinkage,
> Constant::getNullValue(ATy), "OptimalEdgeProfCounters", &M);
Then exactly "NumEdges" constants are pushed to the "Initializer":
> Initializer[i] = zeroc;
> ..
> Initializer[i] = minusonec;
> ..
And then I set the initializer for the array:
> Constant *init = llvm::ConstantArray::get(ATy, Initiali...
2009 Jul 01
0
[LLVMdev] Profiling in LLVM Patch
...dges += BB->getTerminator()->getNumSuccessors();
> + }
> + }
> +
> + const ArrayType *ATy = ArrayType::get(Type::Int32Ty, NumEdges);
> + GlobalVariable *Counters =
> + new GlobalVariable(ATy, false, GlobalValue::InternalLinkage,
> + 0, "OptimalEdgeProfCounters", &M);
> +
> + std::vector<Constant*> Initializer = std::vector<Constant*>(NumEdges);
This unnecessarily copies the vector, please use:
std::vector<Constant*> Initializer(NumEdges);
> + APInt zero(32,0); Constant* zeroc = ConstantInt::get(zero);
>...
2009 Jun 29
7
[LLVMdev] Profiling in LLVM Patch
Hi all,
as proposed in
http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/020396.html
I implemented the algorithm presented in [Ball94]. It only instruments
the minimal number of edges necessary for edge profiling.
The main changes introduced by this patch are:
*) a interface compatible rewrite of ProfileInfo
*) a cleanup of ProfileInfoLoader
(some functionality in ProfileInfoLoader
2009 Jul 01
12
[LLVMdev] Profiling in LLVM Patch
...()->getNumSuccessors();
>> + }
>> + }
>> +
>> + const ArrayType *ATy = ArrayType::get(Type::Int32Ty, NumEdges);
>> + GlobalVariable *Counters =
>> + new GlobalVariable(ATy, false, GlobalValue::InternalLinkage,
>> + 0, "OptimalEdgeProfCounters", &M);
>> +
>> + std::vector<Constant*> Initializer = std::vector<Constant*>(NumEdges);
>
> This unnecessarily copies the vector, please use:
> std::vector<Constant*> Initializer(NumEdges);
Okay.
>> + APInt zero(32,0); Constant* zer...