similar to: [LLVMdev] StructType for dispatch_object_t changed by Linker

Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] StructType for dispatch_object_t changed by Linker"

2012 Dec 14
2
[LLVMdev] StructType for dispatch_object_t changed by Linker
Duncan, thanks for your reply. > Probably the types are not defined precisely the same in each module (maybe you > could send the exact definitions in each module to the mailing list?), In the module loaded in Step 1 (otherModule): %struct.dispatch_group_s = type opaque %union.dispatch_object_t = type { %struct.dispatch_object_s* } %struct.dispatch_object_s = type opaque In the
2012 Dec 14
0
[LLVMdev] StructType for dispatch_object_t changed by Linker
Le 14 déc. 2012 à 17:08, Jaymie Strecker <jstrecker at kosada.com> a écrit : > Duncan, thanks for your reply. > >> Probably the types are not defined precisely the same in each module (maybe you >> could send the exact definitions in each module to the mailing list?), > > > In the module loaded in Step 1 (otherModule): > > %struct.dispatch_group_s =
2012 Dec 14
0
[LLVMdev] StructType for dispatch_object_t changed by Linker
Hi Jaymie, ... > Step 2: %union.dispatch_object_t = type { %struct.dispatch_object_s* } > Step 4: %union.dispatch_object_t = type { %struct.dispatch_object_s.1* } > > Code that reproduces the problem is at http://pastebin.com/pxveBUJa and > http://pastebin.com/GDb9n9xA. > > A workaround is to call > `StructType::create(mod->getContext(),
2008 Jan 16
0
[LLVMdev] Cross-module function calls (code included)
Hello, I'm not sure what I am trying to do is possible. I'm trying to create two modules, and call a function in one module from another module. First, a reassurance that I'm not trying to do something completely off the wall would be nice as I don't see any tutorials that do this. Second, any help getting this to work would be wonderful. Thanks, Aaron In my code, you'll
2019 Jan 15
2
Function - replaceAllUsesWith
On Mon, Jan 14, 2019 at 3:21 AM Gaier, Bjoern via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Hello LLVM-World, currently I play around with a „llvm::Module” and an external function defined there “puts”. Normally this function gets resolved in the JIT-Process but I wonder about two things: 1. Can I resolve the function already in this step? I
2018 May 22
0
Metadata on StructType
Hi, Can we attach metadata to StructTypes in LLVM IR? If not, is there any other way to add meta information? Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180522/46206b08/attachment.html>
2004 Mar 28
0
[LLVMdev] PATCH: Typo is StructType assert
If you put a VoidTy as a field of a StructType, you get: /proj/work/llvm/llvm/lib/VMCore/Type.cpp:380: llvm::StructType::StructType(const std::vector<const llvm::Type*, std::allocator<const llvm::Type*> >&): Assertion `Types[i] != Type::VoidTy && "Void type in method prototype!!"' failed. I believe "method prototype" should be "structure
2010 Nov 03
0
[LLVMdev] StructType member offset
On 02/11/10 22:48, Mark Leone wrote: > You can also use getelementptr to get the offset of a struct member: > > http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt Yup, except that this returns a constant expression in general, rather than a number. There's even a helper for doing this: ConstantExpr:getOffsetOf Ciao, Duncan. > > - Mark > > On
2011 Mar 14
0
[LLVMdev] how to build a StructType incrementally
Hi! StructType has no method for adding elements, but I'd like to build a type incrementally, i.e. it starts empty and a global of the type exists. then load instructions are added to a basic block and for each load instruction an element to the type has to be added. Is there a way to do this? For example I could first use UndefValues instead of load and then do a replaceAllUsesWith when the
2011 Jul 19
1
[LLVMdev] StructType::setName(...)
My apologies if this has already been discussed/explained (reference?). In browsing the new type system implementation, I was wondering if someone could give a simple example of why one would want to reset the name of a previous realized StructType instance (setBody(...) has been called). My curiosity is enhanced by the fact that reseting a name of a StructType instance may result in a symbol
2012 Feb 09
1
[LLVMdev] Need Help with StructType inheritance
Hi. I have such task: to get information about classes of work program (module) form Module (LLVM class), for example in ModulePass. I tried to analyze source code of LLVM architecture related with Module class, but I have not founded any useful information. Thanks! Yours sincerely, Kadysev Mikhail -------------- next part -------------- An HTML attachment was scrubbed... URL:
2012 Nov 09
1
[LLVMdev] Do I need to calculate padding by myself to construct a StructType ?
I am using LLVM C++ API to generate IR for some structure data. For example: struct mystruct {int a:1; int b:2; unsigned long c} = {{1, 2, 3}}; I read the document and tried the demo cgi, it seems the API requires user to handle padding and value combination for the initializer by themselves. Is there any way to create the struct more simply like this:
2013 Jan 22
2
[LLVMdev] StructType opaque->sized
I'm building a StructType without a body using StructType *StructType::create(LLVMContext &Context, StringRef Name); and then later adding a body to with setBody(). It starts of isOpaque() == true, and isSized() == false, and after I add the body, isOpaque() == false, but isSized() is still false. If I create a StructType using StructType * StructType ::create(LLVMContext
2013 Jan 22
0
[LLVMdev] StructType opaque->sized
Hi Rick, On 22/01/13 09:04, Rick Mann wrote: > I'm building a StructType without a body using > > StructType *StructType::create(LLVMContext &Context, StringRef Name); > > and then later adding a body to with setBody(). It starts of isOpaque() == true, and isSized() == false, and after I add the body, isOpaque() == false, but isSized() is still false. this is the standard
2013 Jan 26
1
[LLVMdev] MCJIT/interpreter and iostream
As of LLVM 3.2, is it possible to use iostream with the MCJIT or interpreter execution engines? I'm getting some errors... Each of these commands correctly prints "hello": echo -e '#include <stdio.h>\nint main(){ printf("hello"); }' | clang -cc1 -emit-llvm-bc -x c++ | lli -use-mcjit echo -e '#include <iostream>\nint main(){ std::cout <<
2010 Oct 26
2
[LLVMdev] StructType member offset
Hi, how can i correctly calculate the size of a member of a struct (including alignment etc)? This doesn't work : const StructType *STy = cast<StructType>(Ty); for (StructType::element_iterator I = STy->element_begin(), E = STy->element_end(); I != E; ++I) { usigned size =I->get()->getScalarSizeInBits(); //often
2009 Mar 26
0
[LLVMdev] StructType field names
Anthony Danalis wrote: > Hello, > > I'm trying to construct a string like "a[1][x].y" in an optimization > pass by digging deeper and deeper into a GetElementPtrInst. I can > successfully deal with the array/pointer part, but when it comes to > the structure field name "y", I cannot figure out how to get anything > but the index into the
2009 Mar 26
2
[LLVMdev] StructType field names
Hello, I'm trying to construct a string like "a[1][x].y" in an optimization pass by digging deeper and deeper into a GetElementPtrInst. I can successfully deal with the array/pointer part, but when it comes to the structure field name "y", I cannot figure out how to get anything but the index into the structure. Is there a way to do that, or is this information
2018 Jul 24
2
StructType --> DICompositeType?
Is there a more convenient way to obtain a DIType given a Type than matching up the strings for the names? For example, given: struct S { int x, y; } s; void foo(S *a) { a->x = 0; a->y = 1; } There are DIType nodes for the struct Type: !6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !3, line: 1, size: 64, flags: DIFlagTypePassByValue,
2018 Jul 18
2
Why Clang is unpacking my StructType Function arguments
Hi: We are currently building an internal solution based on LLVM/Clang technologies which involves generating LLVM IR based on Bitcode generated by Clang from C codes. We have a C function which prototype looks like the following: typedef struct { int (*allocFunction)(void* x, void* y); void* YY; } Type4; int bar (Type1 *x, Type2 *y, Type3 *z, Type4 bar) When we compile this code