search for: typesymboltable

Displaying 20 results from an estimated 35 matches for "typesymboltable".

2011 Dec 06
3
[LLVMdev] Regarding anonymous types
...{[4 x i8]}   Whereas, LLVM 2.9 defines the types as %0 = type { i32, i8} %anonanonct. = type {%anonanonn.} %anonanonn.  = type { [ 4x i8] } %struct.test = type { %anonanonct., %0}   In case of LLVM2.9, "%0" is interesting case.  When I try to extract types using " Module_Ptr->getTypeSymbolTable()".   Though struct{  union {    char a[4];  }; }; too is anonymous, but a name is given to it, i.e anonanonct.   I need this information as I want to collect all type-names.     Thanks & Regards, Pankaj     for(TypeSymbolTable::const_iterator I = M->getTypeSymbolTable().begin(),    ...
2008 Oct 31
0
[LLVMdev] No of Datastructures
...datastructures and the type, say for > example the number of arrays in a given code. Which pass would give > me this info? And what do I need to use in it? What are you trying to achieve here with this information ? You can iterate over types to collect the info you need. For example, TypeSymbolTable &TST = MyModule.getTypeSymbolTable(); for(TypeSymbolTable::iterator TI = TST.begin(), TE =TST.end(); TI != TE; ++TI) { const Type *Ty = TI->second; ... } http://llvm.org/docs/ProgrammersManual.html is very useful document for beginners. > > Thanks for the help > >...
2008 Oct 31
3
[LLVMdev] No of Datastructures
Hi I am trying to count the no of datastructures and the type, say for example the number of arrays in a given code. Which pass would give me this info? And what do I need to use in it? Thanks for the help Cheers Nipun :) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081031/ffceddee/attachment.html>
2008 Nov 02
2
[LLVMdev] No of Datastructures
..., say for example > the number of arrays in a given code. Which pass would give me this info? > And what do I need to use in it? > > > What are you trying to achieve here with this information ? > > You can iterate over types to collect the info you need. For example, > > TypeSymbolTable &TST = MyModule.getTypeSymbolTable(); > for(TypeSymbolTable::iterator TI = TST.begin(), TE =TST.end(); TI != TE; > ++TI) { > const Type *Ty = TI->second; > ... > } > > http://llvm.org/docs/ProgrammersManual.html is very useful document for > beginners. > &g...
2013 Oct 18
1
[LLVMdev] Iterate through a Module's StructTypes
Hello, I'm updating a legacy code using LLVM 2.5 where it has an iteration through a Module's TypeSymbolTable to process each StructType. In LLVM 3.4, TypeSymbolTable has been removed. I can only find the LLVMContextImpl instance of a Module's LLVMContext which has AnonStructTypes and NamedStructTypes two maps. However, LLVMContextImpl is an opaque class which cannot be directly accessed by my code(a...
2011 Dec 06
0
[LLVMdev] Regarding anonymous types
...efines the types as > %0 = type { i32, i8} > %anonanonct. = type {%anonanonn.} > %anonanonn. = type { [ 4x i8] } > %struct.test = type { %anonanonct., %0} > > In case of LLVM2.9, "%0" is interesting case. > When I try to extract types using "Module_Ptr->getTypeSymbolTable()". > for(TypeSymbolTable::const_iterator I = M->getTypeSymbolTable().begin(), > E = M->getTypeSymbolTable().end(); I != E; ++I) { > if( I->second->isStructTy() ) > { > //code to collect type names > } > } > > I don't get thi...
2008 Nov 05
1
[LLVMdev] No of Datastructures
..., say for example > the number of arrays in a given code. Which pass would give me this info? > And what do I need to use in it? > > > What are you trying to achieve here with this information ? > > You can iterate over types to collect the info you need. For example, > > TypeSymbolTable &TST = MyModule.getTypeSymbolTable(); > for(TypeSymbolTable::iterator TI = TST.begin(), TE =TST.end(); TI != TE; > ++TI) { > const Type *Ty = TI->second; > ... > } > > http://llvm.org/docs/ProgrammersManual.html is very useful document for > beginners. > &...
2008 Nov 02
0
[LLVMdev] No of Datastructures
...or >> example the number of arrays in a given code. Which pass would give >> me this info? And what do I need to use in it? > > What are you trying to achieve here with this information ? > > You can iterate over types to collect the info you need. For example, > > TypeSymbolTable &TST = MyModule.getTypeSymbolTable(); > for(TypeSymbolTable::iterator TI = TST.begin(), TE =TST.end(); TI != > TE; ++TI) { > const Type *Ty = TI->second; > ... > } > > http://llvm.org/docs/ProgrammersManual.html is very useful document > for beginners. &gt...
2015 Apr 15
2
[LLVMdev] where is type symbol table now
Hello, I found some source code using llvm 2.5 that has a call to Module::getTypeName(Type*), which I can't find it anymore in llvm newer than 3.3, so how can I get the name of a type(e.g a user-defined structure) if we have Type* of that ? Besides, I checked that old llvm maintains a TypeSymbolTable that enabled type name look-up, so what's the replacement and mechanism of it in the newer llvm now ? thanks -- Best regards Hui Zhang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150415/0fe1aae3/...
2008 Nov 03
1
[LLVMdev] No of Datastructures
...of arrays in a given code. Which pass would give > >> me this info? And what do I need to use in it? > > > > What are you trying to achieve here with this information ? > > > > You can iterate over types to collect the info you need. For example, > > > > TypeSymbolTable &TST = MyModule.getTypeSymbolTable(); > > for(TypeSymbolTable::iterator TI = TST.begin(), TE =TST.end(); TI != > > TE; ++TI) { > > const Type *Ty = TI->second; > > ... > > } > > > > http://llvm.org/docs/ProgrammersManual.html is very useful d...
2011 Jun 25
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
...s <baldrick at free.fr> wrote: >> 3. Clang/dragonegg need to adapt to the new API (help appreciated!) > > what needs to be done exactly? Background info: http://www.nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt As I understand it, PATypeHolder, OpaqueType and the Module's TypeSymbolTable are gone. Instead, StructTypes can optionally be named, and if they are then: - they use name equivalence instead of structural equivalence. - you can create them without any fields, and then add the fields later when the struct is complete. I've played with the Clang bits of this. The bigges...
2011 Jun 25
3
[LLVMdev] inefficiencies in ConstantUniqueMap ?
Hi Chris, > 3. Clang/dragonegg need to adapt to the new API (help appreciated!) what needs to be done exactly? Ciao, Duncan.
2012 Sep 22
2
[LLVMdev] Typedef struct types
...ct._D_ChannelReg* In this case "gInterPredD" is a global variable and hence I easily get information about it's type and their element type.   But for the case, where an instance of this 'typedefed struct' is passed as a variable or used inside a function, In llvm2.9, we had TypeSymbolTable in module which used to have information about all the types explicitly. I think no such information is present from llvm3.0 onwards due to type system change. So, is it the case that I have to get the type information as and when I encounter any variable which is of type 'typedefed struct'...
2011 Jun 30
5
[LLVMdev] inefficiencies in ConstantUniqueMap ?
Hi Jay, > As I understand it, PATypeHolder, OpaqueType and the Module's > TypeSymbolTable are gone. Instead, StructTypes can optionally be > named, and if they are then: > > - they use name equivalence instead of structural equivalence. > - you can create them without any fields, and then add the fields > later when the struct is complete. I find this distinction between...
2010 Aug 06
1
[LLVMdev] How to access Debug Type Information (from Cbackend)
Hi, I'm trying to recover the inheritance relations for a class type (so a list of base classes) from a llvm ir file generated via compiling some cpp file using clang. I have access to the TypeSymbolTable and have found the class type I want to know the base classes for in the table. How do I go about extracting this (debug) information? I'm stuck here: if(StructType* pST=dyn_cast<StructType*>(I)) //check it's a struct (or class) { LLVMContext c; pST-&gt...
2011 Jun 30
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On 30 June 2011 14:07, Duncan Sands <baldrick at free.fr> wrote: > Hi Jay, > >> As I understand it, PATypeHolder, OpaqueType and the Module's >> TypeSymbolTable are gone. Instead, StructTypes can optionally be >> named, and if they are then: >> >> - they use name equivalence instead of structural equivalence. >> - you can create them without any fields, and then add the fields >> later when the struct is complete. > > I...
2013 Oct 18
0
[LLVMdev] Iterate through a Module's StructTypes
Hello, I'm updating a legacy code using LLVM 2.5 where it has an iteration through a Module's TypeSymbolTable to process each StructType. In LLVM 3.4, TypeSymbolTable has been removed. I can only find the LLVMContextImpl instance of a Module's LLVMContext which has AnonStructTypes and NamedStructTypes two maps. However, LLVMContextImpl is an opaque class which cannot be directly accessed by my code(a...
2012 Sep 22
0
[LLVMdev] Typedef struct types
...; In this case "gInterPredD" is a global variable and hence I easily get > information about it's type and their element type. > But for the case, where an instance of this 'typedefed struct' is passed as a > variable or used inside a function, > In llvm2.9, we had TypeSymbolTable in module which used to have information > about all the types explicitly. I think no such information is present from > llvm3.0 onwards due to type system change. > So, is it the case that I have to get the type information as and when I > encounter any variable which is of type 't...
2007 Jul 27
2
[LLVMdev] Couple of changes (2005 and other toolchain related)
...BB->pred_begin(); std::advance(PI, dist); I'm not sure if that is the correct fix, but what is currently there is definitely not correct. ReplaceUsesOfBlockWith can invalidate iterators (because internally it adds or removes items from containers) so we need to reset PI if that happens. * TypeSymbolTable.h, MachineModuleInfo.h and Annotation.cpp all use a const sd::string as the key for a std::hash_table or std:map. Keys for containers are assumed to be immutable and not all STL implementations like the superfluous consts. This wasn't a 2005 problem, but related to a different STL implementatio...
2008 Apr 26
0
[LLVMdev] ParamAttr Patch - Alignment fix
...we should use an indexed API for call sites as well. > Index: lib/VMCore/Core.cpp > =================================================================== > --- lib/VMCore/Core.cpp (revision 50213) > +++ lib/VMCore/Core.cpp (working copy) > @@ -20,6 +20,7 @@ > #include "llvm/TypeSymbolTable.h" > #include "llvm/ModuleProvider.h" > #include "llvm/Support/MemoryBuffer.h" > +#include "llvm/Support/CallSite.h" > #include <cassert> > #include <cstdlib> > #include <cstring> > @@ -798,6 +799,101 @@ > return w...