search for: minusonec

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

Did you mean: minusone
2009 Jun 18
3
[LLVMdev] Initialising global Array
...ayType *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 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 exa...
2009 Jun 18
0
[LLVMdev] Initialising global Array
...tic void andiTest1(Module &M) { int NumEdges = 4; const ArrayType *ATy = ArrayType::get(Type::Int32Ty, NumEdges); std::vector<Constant*> Initializer; Initializer.reserve(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), "OptimalEdgeProfCounters1", &M); Initializer[0] = zeroc; Initializer[1] = minusonec; Initializer[2] = minusonec; I...
2009 Jul 01
0
[LLVMdev] Profiling in LLVM Patch
...d::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); > + APInt minusone(32,-1); Constant* minusonec = ConstantInt::get(minusone); Please use: > + Constant* zeroc = ConstantInt::get(llvm::Type::Int32Ty, 0); > + Constant* onec = ConstantInt::getSigned(llvm::Type::Int32Ty, -1); On Mon, Jun 29, 2009 at 6:34 AM, Andreas Neustifter<e0325716 at student.tuwien.ac.at> wrote: > Hi all, &...
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
...itializer = std::vector<Constant*>(NumEdges); > > This unnecessarily copies the vector, please use: > std::vector<Constant*> Initializer(NumEdges); Okay. >> + APInt zero(32,0); Constant* zeroc = ConstantInt::get(zero); >> + APInt minusone(32,-1); Constant* minusonec = ConstantInt::get(minusone); > > Please use: >> + Constant* zeroc = ConstantInt::get(llvm::Type::Int32Ty, 0); >> + Constant* onec = ConstantInt::getSigned(llvm::Type::Int32Ty, -1); Okay. Thank you so much for taking the time and reviewing this giving me very valuable comments...