search for: retval1

Displaying 20 results from an estimated 33 matches for "retval1".

Did you mean: retval
2010 Apr 21
2
[LLVMdev] Function pointers bitcasted to varargs
...#uses=0] store void (...)* bitcast (void ()* @foo to void (...)*), void (...)** %fp, align 8 %0 = load void (...)** %fp, align 8 ; <void (...)*> [#uses=1] call void (...)* %0() nounwind br label %return return: ; preds = %entry %retval1 = load i32* %retval ; <i32> [#uses=1] ret i32 %retval1 } I was wondering why LLVM casts the function pointer to a varargs function?Is there some reason why it should do that? Thanks. Arushi
2011 Aug 19
2
[LLVMdev] How to halt a program
...; [#uses=1] %0 = alloca i32 ; <i32*> [#uses=0] %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] call void @exit(i32 1) noreturn nounwind unreachable return: ; No predecessors! %retval1 = load i32* %retval ; <i32> [#uses=1] ret i32 %retval1 } So, what is the LLVM code to insert the call "call void @exit(i32 1) noreturn nounwind"? I thought about something like: CallInst *abort = CallInst::Create(/*POINTER TO ABORT*/, ArrayRef<Value*>(),...
2011 Jun 29
2
[LLVMdev] hello world error
...ast i32 0 to i32 *%1 = call i32 @puts(i8* getelementptr inbounds ([12 x i8]* @.str, i64 0, i64 0)) nounwind* store i32 0, i32* %0, align 4 %2 = load i32* %0, align 4 store i32 %2, i32* %retval, align 4 br label %return return: ; preds = %entry %retval1 = load i32* %retval ret i32 %retval1 } declare i32 @puts(i8*) The .str is present in the argument to the puts function in %1 is present in the bitcode. But when i use llc to change the bitcode to alpha assembly, i get the following: ldah $29,0($27) !gpdisp!1 lda $29,0($29) !gpdisp!1...
2010 Apr 21
0
[LLVMdev] Function pointers bitcasted to varargs
...itcast (void ()* @foo to void (...)*), void > (...)** %fp, align 8 >  %0 = load void (...)** %fp, align 8             ; <void (...)*> [#uses=1] >  call void (...)* %0() nounwind >  br label %return > > return:                                           ; preds = %entry >  %retval1 = load i32* %retval                    ; <i32> [#uses=1] >  ret i32 %retval1 > } > > I was wondering why LLVM casts the function pointer to a varargs > function?Is there some reason why it should do that? > > Thanks. > Arushi > ______________________________________...
2009 Nov 16
2
[LLVMdev] lli -force-interpreter complains about external function
...[12 x i8]* @.str, i32 0, i32 0)) nounwind ; <i32> [#uses=0] store i32 0, i32* %0, align 4 %2 = load i32* %0, align 4 ; <i32> [#uses=1] store i32 %2, i32* %retval, align 4 br label %return return: ; preds = %entry %retval1 = load i32* %retval ; <i32> [#uses=1] ret i32 %retval1 } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091116/1314fe99/attachment.html>
2011 Aug 19
0
[LLVMdev] How to halt a program
...; <i32*> [#uses=0] > %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] > call void @exit(i32 1) noreturn nounwind > unreachable > return: ; No predecessors! > %retval1 = load i32* %retval ; <i32> [#uses=1] > ret i32 %retval1 > } > > So, what is the LLVM code to insert the call "call void @exit(i32 1) > noreturn nounwind"? I thought about something like: > > CallInst *abort = CallInst::Create(/*POINTER TO...
2012 Oct 07
2
[LLVMdev] Inserting a function call using LLVM
...[12 x i8]* @.str, i64 0, i64 0)) nounwind ; <i32> [#uses=0] store i32 0, i32* %0, align 4 %2 = load i32* %0, align 4 ; <i32> [#uses=1] store i32 %2, i32* %retval, align 4 br label %return return: ; preds = %entry %retval1 = load i32* %retval ; <i32> [#uses=1] ret i32 %retval1 } declare i32 @puts(i8*) 3. I want to write a pass to insert a call foo(int a) after the printf() call, so that it looks like this - #include <stdio.h> int main() { printf("Hello World"); foo(1...
2011 Jun 29
0
[LLVMdev] hello world error
...(i8* getelementptr inbounds ([12 x i8]* @.str, i64 > 0, i64 0)) nounwind* > store i32 0, i32* %0, align 4 > %2 = load i32* %0, align 4 > store i32 %2, i32* %retval, align 4 > br label %return > > return: ; preds = %entry > %retval1 = load i32* %retval > ret i32 %retval1 > } > > declare i32 @puts(i8*) > > The .str is present in the argument to the puts function in %1 is present > in the bitcode. > But when i use llc to change the bitcode to alpha assembly, i get the > following: > > > ld...
2012 Feb 06
2
[LLVMdev] misc questions on opt and bitcode
...[#uses=1] %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] %0 = call i32 @puts(i8* getelementptr inbounds ([8 x i8]* @.str, i64 0, i64 0)) nounwind ; <i32> [#uses=0] br label %return return: ; preds = %entry %retval1 = load i32* %retval ; <i32> [#uses=1] ret i32 %retval1 } declare i32 @puts(i8*) And when I run llc with this IR I get nothing printed on screen. Not sure if my LLVM revision is corrupted and needs a fresh install. When I ran with the bitcode and lli here's what I ge...
2011 Oct 05
2
[LLVMdev] LLVM IR is a compiler IR
All, I should have chimed in earlier, but have been working on two more side-channel variants of this conversation. At the beginning the PNaCl team was strongly pushing for trying to keep platform ABI compatibility on all platforms while taking one portable bitcode stream as input. During the discussions we've had over the past few weeks it became obvious that that is simply not tractable,
2012 Feb 06
0
[LLVMdev] misc questions on opt and bitcode
On Feb 5, 2012, at 11:32 AM, Arpan Sen wrote: > For the very simple example below, I get Unknown instruction error from lli and llvm-dis, while llc does not print anything. Not sure what is that I am missing here. My llvm-gcc version is i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) > 1-39-155-188:pastebin Babai$ llvm-gcc example.c
2010 Oct 19
2
[LLVMdev] Structure memory layout
...7 %2 = or i8 %1, 8 ; <i8> [#uses=1] 18 store i8 %2, i8* getelementptr inbounds (%struct.test* bitcast (%0* @vm to %struct.test*), i32 0, i32 1), align 1 19 br label %return 20 21 return: ; preds = %entry 22 %retval1 = load i32* %retval ; <i32> [#uses=1] 23 ret i32 %retval1 24 } In line5-6, bitfields for struct type is merged. Merging bitfields is affected by type alignment and type size. (type alignment and type size are target dependent information.) I have been convert above bi...
2010 May 13
4
[LLVMdev] How to get the variable mapping between the source and llvm bytecode
...12 ; <i32> [#uses=1] store i32 %5, i32* %0, align 4, !dbg !12 %6 = load i32* %0, align 4, !dbg !12 ; <i32> [#uses=1] store i32 %6, i32* %retval, align 4, !dbg !12 br label %return, !dbg !12 return: ; preds = %entry %retval1 = load i32* %retval, !dbg !12 ; <i32> [#uses=1] ret i32 %retval1, !dbg !12 } declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone !0 = metadata !{i32 459009, metadata !1, metadata !"j", metadata !2, i32 1, metadata !5} ; [ DW_TAG_arg_variable ] !1 = metada...
2010 Oct 19
0
[LLVMdev] Structure memory layout
On 19 October 2010 07:57, Jin Gu Kang <jaykang10 at imrc.kist.re.kr> wrote: > Frist, I have been implementing common type for struct type on bitcode > at compilation time using llvm-gcc and then changing common type to target > specific types at code generation time using llc (reconstruct StructLayout). Hi Jin, Apart from bitfields and unions, the struct type is pretty much target
2012 Oct 08
0
[LLVMdev] Inserting a function call using LLVM
...nd ; <i32> [#uses=0] > store i32 0, i32* %0, align 4 > %2 = load i32* %0, align 4 ; <i32> [#uses=1] > store i32 %2, i32* %retval, align 4 > br label %return > > return: ; preds = %entry > %retval1 = load i32* %retval ; <i32> [#uses=1] > ret i32 %retval1 > } > > declare i32 @puts(i8*) > > 3. I want to write a pass to insert a call foo(int a) after the printf() call, > so that it looks like this - > #include <stdio.h> > int main() {...
2011 Jan 05
0
[LLVMdev] force inlineing a function using opt
If I understand correctly, you're saying that the C source definition of the prologue function is declared as static. If you compile that function to LLVM IR, it will get interal linkage and will not be visible to functions in other compilation units; instead, it will get renamed if there is a function defined with the same name. As such, it will never get inlined as the instrumented code
2011 Nov 03
5
[LLVMdev] LLVM problem, please do not ignore
...pe is ddddbbm 8 store i32 %7, i32* %0, align 4 and the type is ddddbbm 28 %7 = add nsw i32 %5, %6 is erased, ba! %7 = load i32* %0, align 4 and the type is ddddbbm 27 store i32 %7, i32* %retval, align 4 and the type is ddddbbm 28 br label %return and the type is ddddbbm 2 ret i32 %retval1 and the type is ddddbbm 1 0 opt 0x00000000008ed93f 1 opt 0x00000000008edcea 2 libpthread.so.0 0x00007f9ba1183c60 3 opt 0x00000000004b3615 llvm::PATypeHolder::get() const + 21 4 opt 0x00000000008a4f11 5 opt 0x00000000008a9404 6 opt...
2010 May 13
0
[LLVMdev] How to get the variable mapping between the source andllvm bytecode
...es=1] > store i32 %5, i32* %0, align 4, !dbg !12 > %6 = load i32* %0, align 4, !dbg !12 ; <i32> [#uses=1] > store i32 %6, i32* %retval, align 4, !dbg !12 > br label %return, !dbg !12 > return: ; preds = %entry > %retval1 = load i32* %retval, !dbg !12 ; <i32> [#uses=1] > ret i32 %retval1, !dbg !12 > } > declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone > !0 = metadata !{i32 459009, metadata !1, metadata !"j", metadata !2, i32 1, metadata !5} ; [ DW_TAG_arg_va...
2010 Oct 19
4
[LLVMdev] Structure memory layout
Hi LLVM members, I have been working to make target independent memory layout for struct type(Aggregate type) in my team. I think that struct type has different memory layouts according to each target system in current LLVM. To implement target dependent concept for struct type, Frist, I have been implementing common type for struct type on bitcode at compilation time using llvm-gcc and then
2011 Jan 04
3
[LLVMdev] force inlineing a function using opt
Hi, I am instrumenting the stores in a program by inserting a function call (store_prologue) before every store instruction in the IR file. I set the prologue function's attribute to "AlwaysInline" using addFnAttr(). In the program the prologue function is defined as static inline. I am using opt to generate an optimized (inline the calls to the store prologue) using the