search for: nounwind

Displaying 20 results from an estimated 2084 matches for "nounwind".

2012 Nov 01
2
[LLVMdev] llvm linking issue
I have three modules: ----------------------------------------------------------------- s1.ll: %0 = type <{ i32, i32 }> define void @s1(%0* byval %myStruct) nounwind { return: ret void } ----------------------------------------------------------------- s2.ll: %0 = type <{ i32, i32 }> define void @s2(%0* byval %myStruct) nounwind { return: ret void } ----------------------------------------------------------------- s3.ll: %0 = type <{ i32, i32 }&g...
2012 Nov 01
0
[LLVMdev] llvm linking issue
...ks like a bug to me - please file a bug report. Ciao, Duncan. On 01/11/12 04:35, Guo, Xiaoyi wrote: > I have three modules: > ----------------------------------------------------------------- > s1.ll: > > %0 = type <{ i32, i32 }> > > define void @s1(%0* byval %myStruct) nounwind { > return: > ret void > } > ----------------------------------------------------------------- > s2.ll: > > %0 = type <{ i32, i32 }> > > define void @s2(%0* byval %myStruct) nounwind { > return: > ret void > } > ------------------------------------...
2017 Feb 05
2
help me understand how nounwind attribute on functions works?
from http://llvm.org/docs/LangRef.html: nounwind > This function attribute indicates that the function never raises an > exception. If the function does raise an exception, its runtime behavior is > undefined. However, functions marked nounwind may still trap or generate > asynchronous exceptions. Exception handling schemes that are r...
2017 Feb 09
4
help me understand how nounwind attribute on functions works?
...doThing(bool canThrow); > // foo.cpp > int doThing(bool canThrow) { > ... > if (hadError) { > if (canThrow) throw MyException; else return -1; > } > } > // bar.c > #include "foo.h" > void f() { > doThing(false); // don't declare doThing as nounwind > } > // baz.cpp > ... > doThing(true); > > Basically, compiling a C declaration for a function is not an assertion that it never throws an exception. However, *defining* a function in a C TU implies that it will not throw an exception. What isn’t clear to me still is : why sh...
2012 May 22
4
[LLVMdev] How to get llvm bitcode executed
...cenario where some function definitions are missing in a llvm bitcode, can we get a way to run this module via llc or lli? Or is there any way to make these function definitions available in the llvm bitcode? Specifically, these missing functions are as below: declare i8* @llvm.eh.exception() nounwind readonly declare i32 @__gxx_personality_v0(...) declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind declare void @llvm.eh.resume(i8*, i32) declare void @_ZSt9terminatev() declare i32 @memcmp(i8*, i8*, i64) declare i64 @llvm.expect.i64(i64, i64) nounwind readnone declare void @_ZSt19...
2012 Jul 12
4
[LLVMdev] Documentation about converting GIMPLE IR to LLVM IR in LLVM-GCC/DragonEgg
Dear All, I am trying to understand the process followed for converting GIMPLE IR to LLVM IR in LLVM-GCC/DragonEgg - more importantly conversion of OpenMP extended GIMPLE IR to LLVM IR. It would be great if anybody points me to some documentation before I my-self delve into the understanding of related source code. -- Cheers -mahesha -------------- next part -------------- An HTML attachment
2012 Jan 23
2
[LLVMdev] Possible bug in the dragonegg
...8] c"aaaaaaaaaaaaaa\00", align 8 @.cst1 = linker_private unnamed_addr constant [15 x i8] c"bbbbbbbbbbbbbb\00", align 8 @.cst2 = linker_private unnamed_addr constant [24 x i8] c"a = %s, b = %s, c = %s\0A\00", align 8 define i32 @main(i32 %argc, i8** nocapture %argv) nounwind uwtable ssp { entry: %memtmp = alloca [15 x i8], align 1 %memtmp1 = alloca [15 x i8], align 1 %0 = getelementptr inbounds [15 x i8]* %memtmp, i64 0, i64 0 %1 = getelementptr inbounds [15 x i8]* %memtmp1, i64 0, i64 0 call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* getelementptr inb...
2011 Sep 15
2
[LLVMdev] problem with sgt's on Sparc machine
...#39; target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32" target triple = "sparc-unknown-linux" @P = global i32 1 @dP = global i32 1 @.str = private constant [4 x i8] c"%d\0A\00", align 1 define i32 @main() nounwind { entry: %. = load i32* @P, align 4 %t1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %. ) nounwind %d. = load i32* @dP, align 4 %t2 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([4 x i8]* @.str...
2011 Sep 15
2
[LLVMdev] problem with sgt's on Sparc machine
...:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32" target triple = "i386-pc-linux-gnu" @P = global i32 1 @dP = global i32 1 @.str = private constant [4 x i8] c"%d\0A\00", align 1 define i32 @main() nounwind { entry: %. = load i32* @P, align 4 %t1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %. ) nounwind %d. = load i32* @dP, align 4 %t2 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([4 x i8]* @.str...
2016 Mar 24
4
attribute of intrinsic function
...int_foo5 : Intrinsic<[], [llvm_ptr_ty], [IntrReadWriteArgMem]>; def int_foo6 : Intrinsic<[], [llvm_ptr_ty], []>; Then I write a very simple module, in each module the intrinsic function is called twice as shown below: /******the intrinsic function foo5 is used******/ ; Function Attrs: nounwind define void @_Z3fooPi(i8* %a) #0 { call void @llvm.foo5(i8* %a) call void @llvm.foo5(i8* %a) ret void } ; Function Attrs: nounwind declare void @llvm.foo5(i8*) #0 attributes #0 = { nounwind } /****** the intrinsic function foo6 is used******/ ; Function Attrs: nounwind define void @_Z3fooPi...
2012 Jan 24
0
[LLVMdev] Possible bug in the dragonegg
...0", align 8 > @.cst1 = linker_private unnamed_addr constant [15 x i8] > c"bbbbbbbbbbbbbb\00", align 8 > @.cst2 = linker_private unnamed_addr constant [24 x i8] c"a = %s, b = > %s, c = %s\0A\00", align 8 > > define i32 @main(i32 %argc, i8** nocapture %argv) nounwind uwtable ssp { > entry: > %memtmp = alloca [15 x i8], align 1 > %memtmp1 = alloca [15 x i8], align 1 > %0 = getelementptr inbounds [15 x i8]* %memtmp, i64 0, i64 0 > %1 = getelementptr inbounds [15 x i8]* %memtmp1, i64 0, i64 0 > call void @llvm.memcpy.p0i8.p0i8...
2009 Sep 27
5
[LLVMdev] A basicblock iterator bug in llvm
...the first instruction in this basicblock. However, "I--;" will fail by an assertion. The basic block ("I" is pointing to the second instruction) in test.ll: bb: ; preds = %bb1 %1 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([42 x i8]* @.str1, i32 0, i32 0)) nounwind ; <i32> [#uses=0] %2 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([40 x i8]* @.str2, i32 0, i32 0)) nounwind ; <i32> [#uses=0] %3 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([40 x i8]* @.str3, i32 0, i32 0)) nounwind ; <i32> [#uses=0] %4 = call...
2014 Mar 20
2
[LLVMdev] Unwind, exception handling, debuggers and profilers
...-S" adds uwtable to all > functions and "clang -S -fno-asynchronous-unwind-tables" doesn't. This is remarkably similar to the behaviour I want to create. But that can't be encoded in IR right now wrt. nothrow. These are the options: 1. no attr: don't emit tables 2. nounwind: emit CantUnwind 3. uwtable: emit table 4. uwtable + nounwind: emit table This is because uwtable means *also* debug/profiler use, and emitting CantUnwind could stop them from unwinding, since there is no information on how to continue unwinding the stack. The semantics I want is to be able to se...
2008 Mar 15
0
[LLVMdev] exact semantics of 'nounwind'
Hi Nick, > Since I'm busy muddying the waters by changing how exception handling > works, I thought I should ask for clarification on the exact behaviour > of the current 'nounwind' attribute found on functions, calls and invokes. > > I was thinking these would be similar to the AA analysis notes like > "doesNotAccessMemory" which is a provable property of the function or > call site being analyzed. Duncan mentioned that doesNotThrow is actually...
2012 Jul 13
0
[LLVMdev] Fwd: Documentation about converting GIMPLE IR to LLVM IR in LLVM-GCC/DragonEgg
...CC: (GNU) 4.7.1 20120603 (prerelease) LLVM: >> 3.2svn\22" >> >> %struct..omp_data_s.2 = type { i32* } >> %struct..omp_data_s.1 = type { i32* } >> %struct..omp_data_s.0 = type { i32 } >> >> define internal void @foo._omp_fn.2(i8* nocapture %.omp_data_i) nounwind >> uwtable { >> entry: >> %0 = bitcast i8* %.omp_data_i to i32** >> %1 = load i32** %0, align 8 >> %2 = load i32* %1, align 4 >> %3 = add i32 %2, 1 >> store i32 %3, i32* %1, align 4 >> ret void >> } >> >> define int...
2017 Feb 10
2
help me understand how nounwind attribute on functions works?
...gt; On Wed, Feb 8, 2017 at 5:45 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: >> >> What isn’t clear to me still is : why shouldn't this be transitive? >> In the example you’re showing, for a caller of f() in bar, what is the >> advantage of knowing that f() is nounwind if it an exception can still be >> thrown? What does it allow? > > > We know an exception cannot unwind out of f. An exception can be thrown > inside something that f calls, but it must be caught before it unwinds > beyond f. So perhaps a viable rule is that every CallInst in...
2011 Sep 15
0
[LLVMdev] problem with sgt's on Sparc machine
...:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32" > target triple = "sparc-unknown-linux" > > @P = global i32 1 > @dP = global i32 1 > > @.str = private constant [4 x i8] c"%d\0A\00", align 1 > > define i32 @main() nounwind { > > entry: >     %. = load i32* @P, align 4 >     %t1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr > inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %. ) nounwind >     %d. = load i32* @dP, align 4 >     %t2 = tail call i32 (i8*, ...)* @printf(i8* noalias getel...
2012 Apr 10
0
[LLVMdev] How to explain this weird phenomenon????????
...@.str = private unnamed_addr constant [18 x i8] c"add result is %d\0A\00", align 1 @.str1 = private unnamed_addr constant [20 x i8] c"minus result is %d\0A\00", align 1 @str = private unnamed_addr constant [13 x i8] c"hello world!\00" define i32 @add(i32 %a, i32 %b) nounwind readnone { entry: %add = add nsw i32 %b, %a ret i32 %add } define i32 @minus(i32 %a, i32 %b) nounwind readnone { entry: %sub = sub nsw i32 %a, %b ret i32 %sub } define i32 @main() nounwind { entry: %call1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str,...
2008 Mar 13
5
[LLVMdev] exact semantics of 'nounwind'
Hi everyone, Since I'm busy muddying the waters by changing how exception handling works, I thought I should ask for clarification on the exact behaviour of the current 'nounwind' attribute found on functions, calls and invokes. I was thinking these would be similar to the AA analysis notes like "doesNotAccessMemory" which is a provable property of the function or call site being analyzed. Duncan mentioned that doesNotThrow is actually an important languag...
2009 Jun 29
4
[LLVMdev] Limitations of Alias Analysis?
...loc3); return 0; } //------------=== End ===------------// The whole process: llvm-gcc -emit-llvm -O0 -c test.c -o test.bc opt test.bc -load libLLVMDataStructure.so -basic-aa -ds-aa -anders-aa -aa-eval -print-all-alias-modref-info The corresponding IR content of main is: define i32 @main() nounwind { entry: %retval = alloca i32 %loc3 = alloca %struct.Location* %loc2 = alloca %struct.Location* %loc1 = alloca %struct.Location* %0 = alloca i32 %"alloca point" = bitcast i32 0 to i32 %1 = call %struct.Location* @getNewLocation(i32 0, i32 0) nounwind store %struct.Loca...