similar to: [LLVMdev] set of integers to metadata

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] set of integers to metadata"

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
2013 May 28
3
[LLVMdev] unexpectedly loop hanging
Hello everyone, I was able to get all the execution paths between 2 points (basic blocks) in my program (with the condition to traverse a loop only once). I mapped all the basic blocks to integers and created a correspondent directed graph. I was able to get all the paths (a path is represented by an integer identifier). For my target program I have 72 paths, but the program hangs unexpectedly
2013 May 28
0
[LLVMdev] unexpectedly loop hanging
As an update, it is a memory problem which I don't know how to fix. I tried to skip the problematic piece of code when in the case when the loop hangs. So I did something like : if( instr ) { LLVMContext& C = instr->getContext(); Value* values[cnt]; errs()<<"\ngy: \n"; if(!(desters==7)){ // this
2013 May 28
1
[LLVMdev] unexpectedly loop hanging
Hi, I don't know much about this issue, but this malloc error won't be solved by a change to delete[] or free. In fact, if you use the incorrect one for simple types, you may not notice it. The error you have seems to me like a memory corruption because you went out of bound and corrupted the memory somewhere, Valgrind may help you figure out what is going on. Cheers, Matthieu
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
2013 May 02
0
[LLVMdev] int to StringRed conversion
Yes, it 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"*) > };
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 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?
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 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 02
0
[LLVMdev] int to StringRed conversion
Hi, I think you may try to use llvm::Twine(int). For example, to convert 30 to string, you can use: Twine(30).str() To convert the string back to integer, you can try the StringRef::getAsInteger(unsigned, APInt &). For example: APInt i; str.getAsInteger(/*radix=*/ 10, /*output=*/ i); Sincerely, Logan On Thu, May 2, 2013 at 9:53 PM, Alexandru Ionut Diaconescu <
2012 May 22
4
“For” calculation is so slow
Dear All, The function I wrote can run well with the small data, but with the large data, the function runs very very slowly. How can I correct it? Thank you very much. My function as below: a<-c(1:240) b<-c(1:240) l=function(a,b){ v=0 u=0 uv=0 v[1]=0 u[1]=0 uv[1]=0 for (i in 1:(length(s)-1)){ v[i]<-((gx[[i]][b,(gx[[i]][a,1]+1)])-(gx[[i]][a,gx[[i]][a,1]+1]))/(gx[[i]][a,gx[[i]][a,1]+1])
2013 Nov 26
2
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
Hello, using the LLVM API, I've build one very simple function that adds two ConstantInts and returns the result. I noticed that, when I emit IR code, it is optimized to a simple "ret i16 42" when I add 40 and 2. I'd like to see the operations that are necessary to compute the result, though. Can I somehow disable this optimization in the pass, leading to more verbose IR code?
2013 May 30
2
[LLVMdev] unexpectedly loop hanging
As an update, here is the current piece of code: Inside a loop iterating over each basic block : *std::vector<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++){
2011 Nov 25
1
Multiple selection, renaming and saving the results
Dear all, I have a big data frame: str(data1) 'data.frame': 18272 obs. of 11 variables: $ tag : int 100001 100002 100003 100005 100007 100008 100009 100011 100012 100014 ... $ sp : Factor w/ 18 levels "acassp","acocar",..: 13 5 7 14 14 18 3 11 13 10 ... $ gx : num 20 10 35 68 88 63 123 115 137 136 ... $ gy : num 30 25 24 1 10 40 45 25 23 45 ...
2007 Sep 23
2
return(x=x,y=y,prob=prob) hasn't been used in R now?
Dear friends, Now, when i use the argument return(x=x,y=y,prob=prob) , R displays the waring message: Warning message: The return value for multiple variables wasn't used in: return(x = x, y = gy, prob = prob) I used the methods of "help.search("return")" and "?return" to get some help, but didn't find info on it. Anybody knows how it should be used
2013 Nov 28
0
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
IRBuilder is a templated class, and one of the template arguments is the constant folder to use. By default it uses the ConstantFolder class which does target-independant constant folding. If you want to disable constant folding you can specify the NoFolder class instead, i.e. declare the builder as follows: IRBuilder<true, llvm::NoFolder> builder(body) On 26 Nov 2013, at 19:23, Daniel
2009 Jul 06
1
how to apply a self-written function to a data frame
Hello, I have written a function in order to analyse gaze paths. It works with the test data but when I try to apply the function to a data frame that stores "the real data" in columns I receive the error message that the " In if (pp > 1) { : condition has length > 1 only the first element will be used " I interpret this error message as saying that only the first
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. >
2002 Oct 12
1
reshape
I'd like to convert a data.frame from (long format): gen maxh resp 1 12.3 y . . . . . . where resp is a factor with levels "y" and "n" to the wide format: gen maxh.y maxh.n . . . . . . I've done it as follows: maxh.y <- split(maxh, resp)$y gy <- split(gen, resp)$y yes <-