search for: getsign

Displaying 20 results from an estimated 23 matches for "getsign".

Did you mean: gettign
2013 May 03
2
[LLVMdev] set of integers to metadata
Hello everyone, I want to pass a set of integers using metadata but I don't know how. I have tried: the integers are in array[] *1. * LLVMContext& C = is->getContext(); Value* values[size]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } *is->setMetadata("path",MDNode::get(C,values));* failes when setMetadata(), since *Hello.cpp:706:56: error: no matching function for call to ‘llvm::MDNode::get(llvm::LLVMContext&, llvm::Value* [(((unsigned int)(((int)cebagcnt) + -0x000000000000...
2013 May 03
0
[LLVMdev] set of integers to metadata
I also tried the following, with no compilation errors, but segfault, core dumped: *LLVMContext& C = is->getContext(); Value* values[size]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } llvm::ArrayRef<Value*> bla = values[size]; is->setMetadata("path",MDNode::get(C,bla));* On Fri, May 3, 2013 at 1:18 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > Hello everyone, > >...
2013 Nov 26
2
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
...llvmFunction->setCallingConv(llvm::CallingConv::C); llvm::BasicBlock * body = llvm::BasicBlock::Create(c, "__entry__", llvmFunction); llvm::IRBuilder <> builder(body); llvm::Value * result = builder.CreateBinOp(llvm::Instruction::BinaryOps::Add, llvm::ConstantInt::getSigned(functionType, 40), llvm::ConstantInt::getSigned(functionType, 2)); builder.CreateRet(result); llvm::verifyModule(module, llvm::PrintMessageAction); std::string errorInfo; llvm::raw_fd_ostream fileStream("test.ll", errorInfo); llvm::PassManager pm; pm.add(llvm:...
2009 Jun 10
0
help with package "simsalabim"
...ckage "simsalabim". I ran command decompSSA with L = length(Amps)/5 The reason is that I have SSA/MTM toolkit running in Mac/OS. SSA/MTM documentation, relative to SSA, recommends that N/10 <= L <= N/5. Documentation of simsalabim package recommens that L=N/2 I ran the command getSignal and felt uncomfortable at picking values for parameters C0 and r0. I would appreciate some suggestion/guidelines because these values seem to influence the trend extraction. I chose C0=0.0005, r0=0.0005 which are both below the Nyquist frequency 1/Amps.dc$L = 0.0007223346 As a consequence, get...
2013 Nov 28
0
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
...lingConv(llvm::CallingConv::C); > llvm::BasicBlock * body = llvm::BasicBlock::Create(c, "__entry__", > llvmFunction); > llvm::IRBuilder <> builder(body); > llvm::Value * result = > builder.CreateBinOp(llvm::Instruction::BinaryOps::Add, > llvm::ConstantInt::getSigned(functionType, 40), > llvm::ConstantInt::getSigned(functionType, 2)); > builder.CreateRet(result); > > llvm::verifyModule(module, llvm::PrintMessageAction); > > std::string errorInfo; > llvm::raw_fd_ostream fileStream("test.ll", errorInfo); > >...
2013 May 28
3
[LLVMdev] unexpectedly loop hanging
...tach the metadata (a path = an integer identifier). I do like this : if( instruc ) { LLVMContext& C = instruc->getContext(); Value* values[cnt]; errs()<<"\ngy: \n"; for(int gy=0;gy<cnt;gy++) { values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),myarray[gy]); errs()<<" "<<gy; } } 1. I checked before this part of the code the values of myarray and they are good 2. It works well for the first 6 instructions (the maximum number of metadata operands they need is 70), b...
2013 May 28
0
[LLVMdev] unexpectedly loop hanging
...LLVMContext& C = instr->getContext(); Value* values[cnt]; errs()<<"\ngy: \n"; if(!(desters==7)){ // this is the condition I put to skip the case when it hanged for(int gy=0;gy<cnt;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),cebag[gy]); errs()<<" "<<gy; } SmallVector<Value*, 100> bla; for(int gy=0;gy<cnt;gy++){ bla.push_back(values[gy]); } instr->setMetadata("pat...
2013 May 28
1
[LLVMdev] unexpectedly loop hanging
...t; > Value* values[cnt]; > errs()<<"\ngy: \n"; > > if(!(desters==7)){ // this is the condition I put to skip the > case when it hanged > > > for(int gy=0;gy<cnt;gy++){ > > values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),cebag[gy]); > errs()<<" "<<gy; > } > > SmallVector<Value*, 100> bla; > > for(int gy=0;gy<cnt;gy++){ > bla.push_back(values[gy]); > } >...
2004 Jun 08
1
[Q] raw -> gpr in aroma package
Hi. Is it possible to make gpr from raw? library(aroma) #read gpr file gpr <- GenePixData$read("gpr123.gpr", path=aroma$dataPath) # gpr -> raw raw <- as.RawData(gpr) # raw -> ma ma <- getSignal(raw, bgSubtract=FALSE) ma.norm <- clone(ma) #normalization normalizeWithinSlide(ma.norm, "s") #ma -> raw raw2 <- as.RawData(ma) I want to make gpr data from raw2 and then I want to write new gpr( write(gpr,¡±result.gpr¡±)). Is it possible? Can anyone help me with this? Than...
2019 May 12
2
Why does verifyFunction dislike this?
...> pty; auto ty = FunctionType::get(rty, pty, false); auto f = Function::Create(ty, GlobalValue::CommonLinkage, "f", module); // Entry block auto entry = BasicBlock::Create(context, "entry", f); builder.SetInsertPoint(entry); // return 0 auto val = ConstantInt::getSigned(rty, 0); builder.CreateRet(val); // Check f->dump(); outs() << verifyFunction(*f) << '\n'; return 0; } Output: define common i32 @f() { entry: ret i32 0 } 1 So the verifier says there is a problem, but I don't see anywhere the problem could be. What am...
2013 May 02
2
[LLVMdev] int to StringRed conversion
I think the better solution should be: LLVMContext& C = is->getContext(); Value *values[] = { ConstantInt::getSigned(Type::getInt64Ty(C), *scsr*), MDString::get(C, *"path"*) }; lnstr.setMetadata(*"your_analysis_name"*, MDNode::get(C, values)); So that you can take advantage of the type system of LLVM bitcode, and don't have to cast the integers from/to strings by yourself. Logan O...
2013 May 02
0
[LLVMdev] int to StringRed conversion
...t sounds good. I can try tomorrow. Thank you for your advice ! On Thu, May 2, 2013 at 5:43 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: > I think the better solution should be: > > > LLVMContext& C = is->getContext(); > Value *values[] = { > ConstantInt::getSigned(Type::getInt64Ty(C), *scsr*), > MDString::get(C, *"path"*) > }; > > lnstr.setMetadata(*"your_analysis_name"*, MDNode::get(C, values)); > > So that you can take advantage of the type system of LLVM bitcode, and > don't have to cast the integers from/t...
2011 Oct 08
0
[LLVMdev] Initializing GC roots
On Oct 6, 2011, at 17:19, Yiannis Tsiouris wrote: > Hello all, > > I set: InitRoots = true; in my gc plugin as i want the roots to be > initialized to the "null" value. > Is there a way to define which value should be the initial one? For > example, i would like to initialize my roots to -5 (tagged, null value > for the GC in my runtime system) instead of 0. >
2019 Feb 05
2
IRBuilder constraints
...trange is, that for a bit shifting operation a global variable address is used as operand. The IRBuilder code for the memread instruction is the following for both cases(simplified version): int constVal = param1; llvm::IRBuilder<>& irb; llvm::Value* op1 = llvm::ConstantInt::getSigned(irb.getInt32Ty(), constVal); auto* pt = llvm::PointerType::get(op1->getType(), 0); auto* addr = irb.CreateIntToPtr(op1, pt); auto* loaded = irb.CreateLoad(addr); irb.CreateStore(loaded, module->getNamedGlobal(regname)); I cannot get LLVM to leave an llvm::Value as ConstantI...
2011 Oct 06
2
[LLVMdev] Initializing GC roots
Hello all, I set: InitRoots = true; in my gc plugin as i want the roots to be initialized to the "null" value. Is there a way to define which value should be the initial one? For example, i would like to initialize my roots to -5 (tagged, null value for the GC in my runtime system) instead of 0. Ofcourse, i could do it in the frontend (storing -5 to all GC roots), but i was wondering
2013 May 29
0
[LLVMdev] unexpectedly loop hanging
Hello Duncan, Yes, I built it with assertions and I have also debug info. On Tue, May 28, 2013 at 5:47 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Alexandru, did you build LLVM with assertions enabled? If not then you > should do. > > Ciao, Duncan. > > ______________________________**_________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu
2013 May 28
2
[LLVMdev] unexpectedly loop hanging
Hi Alexandru, did you build LLVM with assertions enabled? If not then you should do. Ciao, Duncan.
2013 May 02
0
[LLVMdev] int to StringRed conversion
The problem is that I want to pass only srsr which is an int. "marked" was just an example :) Thanks you! On Thu, May 2, 2013 at 5:06 PM, Logan Chien <tzuhsiang.chien at gmail.com>wrote: > I'm not familiar with this, but maybe you can try: > > StringRef tst = ("marked" + Twine(srsr)).str(); > > It seems that you can't use integer as meta data
2013 May 30
2
[LLVMdev] unexpectedly loop hanging
...r<Value*> values; values.resize(cnt); //std::vector<Value*> values(sizeof(Value*)*cnt); //SmallVector<Value*,cnt> values; if(is) { LLVMContext& C = is->getContext(); errs()<<"\ni: \n"; for(i=0;i<cnt;i++){ values[i]=ConstantInt::getSigned(Type::getInt64Ty(C),myArray[i]); errs()<<" "<<myArray[i]; } is->setMetadata("path",MDNode::get(C,values)); errs()<<"\nmodif instr "<<*is<<"\n"; if( (is->getMetadata("path"))...
2013 May 02
4
[LLVMdev] int to StringRed conversion
Hello everyone, I have an integer and I want to convert it to StringRef in order to set metadata. setMetadata->(StringRef, MDNode*); It is there a native LLVM way to do it? 1. In the llvm::APSInt Class is toString() method, which seems it is not for this purpose 2. itoa and string are not part of LLVM 3. stringstream is not part of LLVM 4. to_string is not part of LLVM 5. any casting method?