similar to: [LLVMdev] How to implement list in llvm

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] How to implement list in llvm"

2013 Apr 16
2
[LLVMdev] How to implement list in llvm
Thank you for your answer! You are right, but I still don't know how to build such a list dynamically using LLVM API with user type inside (I don't know this type yet ofc). 2013/4/15 Cristianno Martins <cristiannomartins at gmail.com> > Hi, > > I guess you could use a template with a std::vector: you don't need to > define right away the type, if you create a
2013 Apr 15
0
[LLVMdev] How to implement list in llvm
Hi, I guess you could use a template with a std::vector: you don't need to define right away the type, if you create a template of it. It should look something like that: template<class B> class List { std::vector<B> myList; void insert (int pos, B elem); } template <class B> void List::add (int pos, B elem) { myList.insert(myList.begin()+pos, elem); } Then,
2013 Apr 16
0
[LLVMdev] How to implement list in llvm
Hi, Sorry, but I'm not sure I understand what you're trying to do. I guess you want some kind of superclass of some set of classes that are defined in the llvm api(?). In that case, which are specifically the types you could have in this list you're trying to define? -- Cristianno Martins On Tuesday, 16 de April de 2013 at 04:22, B B wrote: > Thank you for your answer! >
2013 Apr 19
2
[LLVMdev] How to implement list in llvm
Hi! In my compiler I want to give user a list of user defined classes. I tried to use generated bitcode of my own wrapper of std::vector, but there is no possibility to generate bitcode of template, so I finally build it with std::vector<void*>. Do you know about any better solutions how to build such a type with llvm? Maybe there is a llvm built in type that is better choice than external
2007 Dec 05
4
Java parser for R data file?
Hi everyone, Has anyone written a parser in Java for either the ASCII or binary format produced by save()? I need to parse a single large 2D array that is structured like this: list( "32609_1" = c(-9549.39231289146, -9574.07159324482, ... ), "32610_2" = c(-6369.12526971635, -6403.99620977124, ... ), "32618_2" = c(-2138.29095689061, -2057.9229403233, ... ),
2013 May 14
2
[LLVMdev] Queue implementation is being trapped
Hello there, I'm trying to use a simple implementation of a queue (my own implementation of it, actually), and I'm trying to use the functions defined on my queue class inside some llvm-ir code. Unfortunately, the names of the functions are being messed up, then I created some function wrappers just to avoid having to deal with the C++ weird function renaming. So, to easily wrapper the
2013 May 14
0
[LLVMdev] Queue implementation is being trapped
On Tue, May 14, 2013 at 11:42 AM, Cristianno Martins < cristiannomartins at gmail.com> wrote: > Hello there, > > I'm trying to use a simple implementation of a queue (my own > implementation of it, actually), and I'm trying to use the functions > defined on my queue class inside some llvm-ir code. Unfortunately, the > names of the functions are being messed up,
2008 Apr 22
2
[LLVMdev] getting closer!
On Apr 21, 2008, at 6:23 PM, Gordon Henriksen wrote: > On Apr 21, 2008, at 20:09, Terence Parr wrote: > >> Ok, I *might* be getting this from the assembly code. ... From >> that, it will push/pop in functions? If so, that's easy enough. :) > > Yup! Sounds like you've got it. Yup, what i was missing and what somebody should add to the doc is that
2007 Mar 09
4
How to create a list that grows automatically
Dear R users I would like to know if there is a way to create a list or an array (or anything) which grows automatically as more elements are put into it. What I want to find is something equivalent to an ArrayList object of Java language. In Java, I can do the following thing: // Java code ArrayList myArray = new ArrayList(); myArray.add("object1"); myArray.add("object2");
2007 Mar 09
4
How to create a list that grows automatically
Dear R users I would like to know if there is a way to create a list or an array (or anything) which grows automatically as more elements are put into it. What I want to find is something equivalent to an ArrayList object of Java language. In Java, I can do the following thing: // Java code ArrayList myArray = new ArrayList(); myArray.add("object1"); myArray.add("object2");
2013 Jun 25
4
[LLVMdev] get value
Hi Cristianno, Thank you, it works :) with an extra cast:                                     Value *v ......                                     ConstantInt* RR = (ConstantInt *)v;                                     uint64_t VV = (RR->getValue()).getLimitedValue();                                     errs()<<"\nRR  "<<VV<<"\n";
2012 Apr 08
2
[LLVMdev] Function and inheritance
Hello guys, So, I'm stucked in a problem involving a Function and a derived class. Well, I was refactoring part of my pass code, and created two classes in this process that are interesting here: class A and class B. Class B inherits from class A; on the other hand, class A has some pure virtual methods (already implemented in class B), and a Module, that holds only one auxiliary function (a
2013 Jun 25
0
[LLVMdev] get value
Oops, that's true: I forgot about that XD sorry =) Glad I could help, -- Cristianno Martins PhD Student of Computer Science University of Campinas cmartins at ic.unicamp.br <cristiannomartins at hotmail.com> On Tue, Jun 25, 2013 at 4:38 AM, Alexandru Ionut Diaconescu < cyrusthevirus001x at yahoo.com> wrote: > Hi Cristianno, > > Thank you, it works :) > > with
2013 May 31
2
[LLVMdev] Dead Code Elimination and undef values
Hello there, I'm writing a transformation pass for LLVM, and I hoped to use dce to clean up the resulting code after my pass. I just have some questions about LLVM's dce implementation. Well, my transformation is a function pass, and, after the changes are made, some instructions are not needed anymore. In order to easily get rid of those instructions, I'm setting all their uses to
2012 Apr 09
0
[LLVMdev] Function and inheritance
Hello again, So, after some changes, I inserted intentionally values with use in other modules, and I get the following error: While deleting: i1 % Use still stuck around after Def is destroyed: %c = phi i1 [ false, <badref> ] [...] Assertion failed: (use_empty() && "Uses remain when a value is destroyed!"), function ~Value, file
2013 Jun 26
0
[LLVMdev] get value
Alexandru Ionut Diaconescu wrote: > Hi Cristianno, > > Thank you, it works :) > > with an extra cast: > Value *v ...... > ConstantInt* RR = (ConstantInt *)v; Please use "cast<ConstantInt>(v)" instead. See http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates . Nick > uint64_t VV = (RR->getValue()).getLimitedValue(); >
2012 Mar 05
1
[LLVMdev] Problem using march=c
Hello again, Thanks for the responses =) Dmitry, I have two points to comment: - First, I applied these two patches, and the .cbe.c file came out ok, except for one little thing -- the global variable was created with both modifiers: static and extern. Then, I just added a single guard to prevent this to happen (in a case of a variable having local linkage, the "extern" part was not
2013 Jun 01
0
[LLVMdev] Dead Code Elimination and undef values
Hi Cristianno, On 01/06/13 01:49, Cristianno Martins wrote: > Hello there, > > I'm writing a transformation pass for LLVM, and I hoped to use dce to clean up > the resulting code after my pass. I just have some questions about LLVM's dce > implementation. > > Well, my transformation is a function pass, and, after the changes are made, > some instructions are not
2012 Apr 04
2
[LLVMdev] BasicBlock predecessors list
Hi there, I'm trying to get a list of predecessors of a BasicBlock. I'm using a code similar to that on here (http://llvm.org/docs/ProgrammersManual.html#iterate_preds), but it appears to be more nodes been iterating that it should. Now, when I print out the llvm IR, I get something like: […] while.body: ; preds = %7, %while.cond […] for a code that
2013 Jun 25
2
[LLVMdev] get value
Hello ! This may be a trivial question, but I cannot get fields from a Value type. If my Value is i32 1, how can I store 1 in a different structure (an integer) ? For the type, I have getType(). For the value, I see no method in Value.h. I tried to cast to ConstantExpr and then to get operands, or cast to ConstantDataArray and then use getAsString(), but is not working. How should I get the