search for: addtypenam

Displaying 20 results from an estimated 29 matches for "addtypenam".

Did you mean: addtypename
2018 Aug 25
3
PATypeHolder, refineAbstractTypeTo(), addTypeName not found
...some class/function of it is not present in my source code due to replacement of this function in newer llvm verion. Can someone please suggest me the alternative approach of these function in latest llvm version. Here are those classes and functions : 1) PATypeHolder 2) refineAbstractTypeTo() 3) addTypeName() 4) getLayoutType() 5) getInterfaceIndex() 6) OpaqueType::get() Many thanks in advance. With Regards, Ratnesh Tiwari -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180825/4caab194/attachment.html>
2005 Mar 21
2
[LLVMdev] Recursive Types using the llvm support library
...ype: \1* Is a pointer to pointer to pointer to pointer.... In "{\2*}", the upreference refers to the structure type, not the pointer, with \4, it means go 4 types up etc. In practice, this is leads to a horrible mess, as you've noticed. As such, I'd suggest using Module::addTypeName to give these things names so that you have a hope to understand them and so they are more compact :) -Chris > alloca { { int, uint, sbyte*, \4* (), \4* (\4*), { { int, uint, sbyte*, \4* (), { { int, uint, sbyte*, \4 (), \4 (\4), \8* (\4), \4 (\4) } }* (\4*), \4* (\4*), \4* (\4*), { { int,...
2005 Mar 21
0
[LLVMdev] Recursive Types using the llvm support library
...to pointer to pointer to pointer.... In "{\2*}", the > upreference refers to the structure type, not the pointer, with \4, it > means go 4 types up etc. > > In practice, this is leads to a horrible mess, as you've noticed. As > such, I'd suggest using Module::addTypeName to give these things names so > that you have a hope to understand them and so they are more compact :) I took your advide and used Module::addTypeName which is a great idea that I didn't know about. Now I am getting a seg fault, here SymbolTable.cpp:251 if (T->isAbstract()) {...
2005 Mar 21
1
[LLVMdev] Recursive Types using the llvm support library
On Sun, 20 Mar 2005, John Carrino wrote: >> In practice, this is leads to a horrible mess, as you've noticed. As >> such, I'd suggest using Module::addTypeName to give these things names so >> that you have a hope to understand them and so they are more compact :) > > I took your advide and used Module::addTypeName which is a great idea > that I didn't know about. > > Now I am getting a seg fault, here > > SymbolTable.cpp:2...
2007 Sep 12
0
[LLVMdev] C interface
...ould I prefer a Unixy flavor instead?) Naming prefix is LLVM, > which may be a bit long. (Would LL be better?) LLVM seems fine to me, and the naming convention seems ok (using lowercase + underscores makes the name longer). I do find things like this slightly strange: /* Same as Module::addTypeName. */ int AddTypeNameToModule(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty); I'd expect it to be named something like "LLVMModuleAddTypeName" or something, using NamespaceClassMethod uniformly. > Pointers are opaque, obviously. I find myself copying enums, which > is...
2003 Dec 31
1
[LLVMdev] Getting A Type By Name
What's the RightWay(tm) to get a named type? I want to use the Module's symbol table as a repository for named types. But, it doesn't have a way to get the type out unless you already know what it is (i.e. the addTypeName() method). Similarly the SymbolTable class's lookup() method requires a type as well. The Type class also didn't have anything obvious. I want something like: Type* Module::getNamedType( std::string& name ); which returns the type if found or null if not found. This is too simple t...
2008 Mar 04
1
[LLVMdev] [PATCH] Prefer to use *.opt ocaml executables as they are more efficient.
I noticed that the ocaml compilation isn't using the .opt executables if they're available. We might gain a slight optimization in ocaml compile time by optionally using them with this patch. --- autoconf/configure.ac | 18 +++++ configure | 195 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 188 insertions(+), 25 deletions(-) -------------- next part
2008 Mar 04
0
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
...); > void LLVMSetDataLayout(LLVMModuleRef M, const char *Triple); > > -/* Target triple */ > +/** Target triple. See [Module::getTargetTriple]. */ > const char *LLVMGetTarget(LLVMModuleRef M); > void LLVMSetTarget(LLVMModuleRef M, const char *Triple); > > -/* Same as Module::addTypeName. */ > +/** See [Module::addTypeName]. */ > int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef > Ty); > void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name); > > @@ -198,7 +201,10 @@ void LLVMDeleteTypeName(LLVMModuleRef M, const > char *Name); > *...
2008 Mar 04
1
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
--- bindings/ocaml/llvm/llvm.ml | 2 +- bindings/ocaml/llvm/llvm.mli | 2 +- bindings/ocaml/llvm/llvm_ocaml.c | 2 +- include/llvm-c/Core.h | 32 +++++++++++++++++++------------- 4 files changed, 22 insertions(+), 16 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 316a84e85ed2363551149e65a227c8e7c8192624.diff Type:
2007 Sep 12
7
[LLVMdev] C interface
Hi all, I'm authoring a C interface to the LLVM IR type system. Since this is Really Quite Tedious, I would like to solicit opinions before I get too far down any paths that seem offensive. I've attached the header, where I've mapped a portion of Module and most of Type and its subclasses. This is working, and I've built ocaml bindings on top of it.[1] My intent is to
2008 Oct 03
1
[LLVMdev] Question about recursive types
...e same. cast<OpaqueType>(StructTy.get())->refineAbstractTypeTo(NewSTy); // NewSTy is potentially invalidated, but StructTy (a PATypeHolder) is // kept up-to-date NewSTy = cast<StructType>(StructTy.get()); // Add a name for the type to the module symbol table (optional) MyModule->addTypeName("mylist", NewSTy); However, it does not work. The compiler says that the API of PointerType::get(PATypeHolder &) does not exist. It seems that the API has been removed from LLVM trunk. I'd be very appreciated if you could tell me how to construct Recursive Type using the...
2009 Apr 29
0
[LLVMdev] Anonymous Structures
On 2009-04-29, at 10:53, Nick Johnson wrote: > I am writing a pass which must insert calls to an external library. > One of the parameters to functions in this library is a very large, > complex structure (let's call it Foo). [...] The internal > representation of Foo is important to this library, but the code my > pass generates will only deal with Foo-pointers. >
2010 Jun 14
2
[LLVMdev] Adding fields in a already built type?
Hi, We build a type with StructType::get(fModule->getContext(), fDspFields, false); with a fDspFields (std::vector<const llvm::Type*> fDspFields;) that is not yet completely known when we have to build the type. It is possible to add fields in a already build type? Thanks Stéphane Letz
2010 Jun 14
0
[LLVMdev] Adding fields in a already built type?
On Jun 14, 2010, at 1:22 PM, Stéphane Letz wrote: > Hi, > > We build a type with StructType::get(fModule->getContext(), fDspFields, false); with a fDspFields (std::vector<const llvm::Type*> fDspFields;) that is not yet completely known when we have to build the type. It is possible to add fields in a already build type? Nope, types are immutable once created. The only
2003 Jan 28
1
[LLVMdev] Building a new struct type, etc
Hi folks, I was just wondering if someone would be willing to tell me the best way to make a new structure type in LLVM and get it inserted as a valid type into a particular Module instance? I've done the following: vector<const Type*> types; types.push_back(Type::UIntTy); types.push_back(Type::UIntTy); structType = StructType::get(types); But
2008 Jun 12
0
[LLVMdev] code generation order revisited.
On Jun 12, 2008, at 13:25, Hendrik Boom wrote: > So it appears that types are processed for identity the moment they > are made during parse tree construction? Yes. > This means that a type has to be completely known on creation. Yes. > Presumably there's some mechanism tor a type that isn't completely > known yet -- or is thet avoided by having a type
2008 Jun 13
1
[LLVMdev] code generation order revisited.
...mably NewSTy is already that StructType. But then I noticed that here we are assigning a StructType to a variable that is pointer-to-StructType instead. So I don't even know what I should be wondering about. : // Add a name for the type to the module symbol table (optional) : MyModule->addTypeName("mylist", NewSTy); -- hendrik
2005 Mar 21
0
[LLVMdev] Recursive Types using the llvm support library
On Wed, Mar 09, 2005 at 04:05:32PM +0300, Vladimir Merzliakov wrote: > >>Is assert(!NewSTy->isAbstract()) must pass after this line? > > > >In this case, yup. > > > I create test program and assert failed in it: > > { \2 *, sbyte * } How do I decode the \2 in this? I am creating types through this interface and I get quite a mess seen below. And this is
2006 Feb 24
0
[LLVMdev] gcc like attributes and annotations
...data, you should just use an std::map from the Value* to your data. > %struct.A = type { int } > %struct.B = type { int } > > BTW: How would one generate a type alias like the above through the LLVM > API? Add two entries to the module symbol table for the same Type using Module::addTypeName. > But sometimes it would be interesting to actually get symbol information > about a type beeing used, without the need for full featured debug > information ala DWARF. This isn't something you can do, this is far more tricky than you make it out to be. :) > This could be also...
2009 Apr 29
2
[LLVMdev] Anonymous Structures
Hello, I am writing a pass which must insert calls to an external library. One of the parameters to functions in this library is a very large, complex structure (let's call it Foo). Foo has many fields, strange target-dependent alignment requirements, and is likely to change many times in the future. The internal representation of Foo is important to this library, but the code my pass