similar to: [LLVMdev] Valgrind Help Needed

Displaying 20 results from an estimated 300 matches similar to: "[LLVMdev] Valgrind Help Needed"

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 > >
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,
2011 Nov 24
1
[LLVMdev] differences in IR and ELF?
I'm trying to create a GlobalVariable that is a ConstantArray. Id like each element to be a pointer to other things in the program(global variables, functions). So that they all have the same type Id like to make the elements void pointers. I think I am going about this wrong, heres how I am doing it: void writeArray(Module &M, GlobalVariable *shadow, Function *val,
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]'
2012 Dec 18
2
[LLVMdev] GetElementPtrConstantExpr
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? 2012/12/18 Óscar Fuentes <ofv at wanadoo.es> > Alessio Giovanni Baroni <alessiogiovanni.baroni at
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*)
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?
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
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
2020 Oct 01
3
Creating a global variable for a struct array
>The type you pass to GlobalVariable's constructor for that variable should be "[10 x %struct.dlist]" because that's what you want storage for. Then the GlobalVariable itself will be a Constant of type "[10 x %struct.dlist]*". Yes, I verified that this is the case. I enabled assertions and the error seems to occur while creating GlobalVariable for both struct dhash
2014 Jan 22
2
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
On 2014 Jan 22, at 07:35, Stepan Dyatkovskiy <stpworld at narod.ru> wrote: > Hi Raul and Duncan, > > Duncan, > Thank you for review. I hope to present fixed patch tomorrow. > > First, I would like to show few performance results: > > command: "time opt -mergefunc <test>" > > File: tramp3d-v4.ll, 12963 functions > Current
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
2020 Sep 30
2
Creating a global variable for a struct array
Let me clarify my question. I have a struct array h1 as follows: dhash h1[10]; I want to get a Constant* to variable h1. It looks like I can use ConstantStruct::get(StructType*, ArrayRef<Constant *>) to do this. My question is how to get the second argument of type ArrayRef<Constant *> from the above variable h1. Thanks, Chaitra ________________________________ From: Tim Northover
2008 Apr 20
4
[LLVMdev] Global variable-length array
Question about "Pascal-style" arrays as mentioned in the reference guide. Suppose I have a global variable which points to a constant, variable length array. The question is, how can I assign an array of type "{ i32, [5 x float]}" to a global of type "{ i32, [0 x float]}"? From my experimentation, it appears you can't bitcast or call GEP on a constant
2019 Feb 22
1
Create the GlobalVariable which have extern in one header file
I have changed it to ExternalLinkage. Now, in LLVM IR, it looks like that: @DATA_TABLE = external global [0 x i8*], section "data_section", align 16 #0 @DATA_TABLE.1 = global [10 x i8*] [i8* inttoptr (i64 53415718 to i8*), i8* bitcast (void (%class.Hello*)* @_ZN5Hello5ptofnEv to i8*),...], section "data_section", align 16 #0 In my uses: %arrayidx = getelementptr inbounds [0 x
2013 Sep 28
1
[LLVMdev] use function address as global variable initializer
Hi I would like to initialize a global variable to the address of a function. Looking at how clang compiles the C code below, i see @main_ptr = global i8* bitcast (i32 ()* @main to i8*), align 8 but how do i generate i8* bitcast (i32 ()* @main to i8*), align 8 in LLVM IR and use it as initializer to a GlobalVariable. I know i will need to use the bitcast instruction. but as far i as i