similar to: [LLVMdev] differences in IR and ELF?

Displaying 20 results from an estimated 300 matches similar to: "[LLVMdev] differences in IR and ELF?"

2011 Nov 24
0
[LLVMdev] differences in IR and ELF?
Contents of section my_section: 400890 c3666666 6666662e 0f1f8400 00000000 .ffffff......... 4008a0 38106000 00000000 b0064000 00000000 8.`....... at ..... 4008b0 d0064000 00000000 0f1f8400 00000000 .. at ............. 4008c0 38106000 00000000 d0064000 00000000 8.`....... at ..... 4008d0 30074000 00000000 0. at ..... This seems too big and doesn't make sense
2011 Nov 15
0
[LLVMdev] constructing global array of pointers?
I'm trying to create a GlobalVariable(that is a ConstantArray) in its own section. I want each element to be a pointer to a global thats already in the program(a variable or function). The follow code makes sense to me and compiles fine, but gives me the wrong output. When I look at the section in the ELF file it is larger than I expected and appears to be wrong. The contents of the array do
2011 Oct 20
3
[LLVMdev] common type at compile time?
I'm trying to create a ConstantArray(whose contents will be of types Function*, GlobalVariable *) so I can immediately create a new GlobalVariable(that will be in its own section). I'm doing this so I have these address stored. In order to create this ConstantArray I need a valid ArrayType, but I'm not sure what to use for the element type. I want this to be done at compile time, so I
2011 Oct 20
2
[LLVMdev] common type at compile time?
I'm a bit confused. For the Type did you mean something like: ArrayType *type = ArrayType::get(Type::getInt8PtrTy(M.getContext()), 4); This does not work, it gives me ""Wrong type in array element initializer" at runtime. Also it doesn't look like ConstantExpr inherits ConstantArray, so I'm not sure how I could use this instead. Thanks On Thu, Oct 20, 2011 at
2011 Oct 20
0
[LLVMdev] common type at compile time?
On 10/20/11 10:43 AM, ret val wrote: > I'm trying to create a ConstantArray(whose contents will be of types > Function*, GlobalVariable *) so I can immediately create a new > GlobalVariable(that will be in its own section). I'm doing this so I > have these address stored. In order to create this ConstantArray I > need a valid ArrayType, but I'm not sure what to use for
2011 Oct 20
0
[LLVMdev] common type at compile time?
On 10/20/11 11:34 AM, ret val wrote: > I'm a bit confused. For the Type did you mean something like: > ArrayType *type = ArrayType::get(Type::getInt8PtrTy(M.getContext()), 4); I assume that creates an ArrayType of 4 elements whose elements are pointers to 8-bit values. If so, then this is what I meant. > This does not work, it gives me ""Wrong type in array
2020 Mar 27
2
[lld] RFC: Allow custom sections to be under GNU_RELRO
Peter, Thanks for the great feedback! > The first is the use of a custom suffix, all other linker conventions, that I know of, use prefixes as these are much easier and faster to match against names. > This can be important in large programs compiled -ffunction-sections as there can be millions of sections to match. I understand the reason of having these conventions in linkers. On the
2012 Dec 19
2
[LLVMdev] GetElementPtrConstantExpr
Ok, now it's arising another problem. IR code that I obtain is the following: i8* bitcast ([5 x i8] c"hello\00" to i8*) generated from instructions: ConstantExpr::getBitCast (ConstantDataArray::getString (getGlobalContext (), "hello"), PointerType::get (Type::getInt8Ty (getGlobalContext ()), 0)) but the LLC tool says: invalid cast opcode for cast from '[5 x i8]'
2014 Mar 11
2
[LLVMdev] [RFC] Section Declarations in LLVM IR
Hi all, I'd like to propose that LLVM IR have a mechanism to describe sections in a more explicit way than we can today. Currently, we provide an attribute called "section" on GlobalVariables and Functions. This attribute will choose which section the Value will end up in. However, it does not describe the attributes of the section. Without a way of describing the section, we try
2012 Dec 19
0
[LLVMdev] GetElementPtrConstantExpr
On 19/12/12 10:25, Alessio Giovanni Baroni wrote: > Ok, now it's arising another problem. IR code that I obtain is the following: > > i8* bitcast ([5 x i8] c"hello\00" to i8*) You need to put your "hello" in a (constant) global variable. You can then bitcast the address of the global to i8*. I suggest you compile some C code that makes use of the address of a
2012 Dec 18
0
[LLVMdev] GetElementPtrConstantExpr
Alessio Giovanni Baroni <alessiogiovanni.baroni at gmail.com> writes: > Because I need to convert an [4 x i8] type to i8* in the instantiation of a > GlobalVariable. > I have the follow declaration: %xxx = type { i8* } and I must emit the > following variable: > @yyy = linkonce_odr constant %xxx { [4 x i8] c"hello\00" }, but it's wrong. > > How do I do?
2007 Sep 20
0
[LLVMdev] Valgrind Help Needed
On Sep 19, 2007, at 4:48 PM, Bill Wendling wrote: > Hi all, > > This program: > > @protocol CPTransferThreadObserving; > > @interface CPMode {} > @end > > @implementation CPMode > -(void) copyInBackgroundAndNotifyUsingPorts { > id client; > [client setProtocolForProxy: > @protocol(CPTransferThreadObserving)]; > } > @end > >
2011 Oct 26
3
[LLVMdev] Use still stuck around after Def is destroyed:
I made a GlobalVariable that is of type ConstantArray. For one of it's elements I assigned it the ConstantExpr::getBitCast of another GlobalVariable(the "shadow pointer" mentioned). This gives me: While deleting: i32 (i32)** %Shadow Variable for ptr1 Use still stuck around after Def is destroyed:i8* bitcast (i32 (i32)** @"Shadow Variable for ptr1" to i8*)
2011 Oct 26
0
[LLVMdev] Use still stuck around after Def is destroyed:
On Oct 26, 2011, at 12:18 PM, ret val wrote: > I made a GlobalVariable that is of type ConstantArray. For one of it's > elements I assigned it the ConstantExpr::getBitCast of another > GlobalVariable(the "shadow pointer" mentioned). This gives me: > > While deleting: i32 (i32)** %Shadow Variable for ptr1 > Use still stuck around after Def is
2007 Sep 20
2
[LLVMdev] Valgrind Help Needed
This should have gotten an assertion failure in a compiler built with assertions, surely... On Sep 19, 2007, at 5:41 PM, Devang Patel wrote: >> $ llvm-gcc -x objective-c -arch ppc64 -std=c99 -c testcase.mi >> testcase.mi:12: internal compiler error: Bus error >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See
2007 Sep 20
1
[LLVMdev] Valgrind Help Needed
On Sep 19, 2007, at 5:41 PM, Devang Patel wrote: > On Sep 19, 2007, at 4:48 PM, Bill Wendling wrote: > > In llvm-backend.cpp : > > 1086 if (GV->getName() != Name) { > 1087 Function *F = TheModule->getFunction(Name); > 1088 assert(F && F->isDeclaration() && "A function turned > into a global?"); > 1089
2007 Sep 20
0
[LLVMdev] Valgrind Help Needed
Adding "--enable-assertions" to the llvm-gcc configure line causes the build to fail. Having just LLVM configured with --enable- assertions doesn't reproduce the error. An assertion build (the Apple way) doesn't assert. -bw On Sep 19, 2007, at 5:48 PM, Dale Johannesen wrote: > This should have gotten an assertion failure in a compiler built > with assertions,
2008 Apr 20
0
[LLVMdev] Global variable-length array
On Apr 19, 2008, at 22:45, Talin wrote: > Suppose I have a global variable which points to a constant, > variable length array. This is somewhat contradictory. Do you want an 'vla *g;' in C? If so, your global will be of type %vla** (you'll load a pointer to the array from the global). Its initializer would be a bitcast of a global which has some type similar to %vla.
2011 Oct 27
1
[LLVMdev] Use still stuck around after Def is destroyed:
No, I am not trying to delete anything. I wanted to created a GlobalVariable that is of Type ConstantArray, where one of the elements its a BitCast of a GlobalVariable. I have that, but I get those errors after my pass is done. I dont know why, my code seems sane enough, and I dont know another way I can go about this. On Wed, Oct 26, 2011 at 4:42 PM, Tanya Lattner <lattner at apple.com>
2014 Feb 27
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi Nick, I tried to rework changes as you requested. One of patches (0004 with extra assertions) has been removed. > + bool isEquivalentType(Type *Ty1, Type *Ty2) const { > + return cmpType(Ty1, Ty2) == 0; > + } > > Why do we still need isEquivalentType? Can we nuke this? Yup. After applying all the patches isEquivalentType will be totally replaced with cmpType. All