search for: _z3barv

Displaying 18 results from an estimated 18 matches for "_z3barv".

2009 Jun 17
8
[LLVMdev] Why are functions renamed for .cpp files with llvm-gcc?
Hello, I wonder why there is a difference in how llvm-gcc compiles .c and .cpp files. Example: ---bar.cpp---- int bar() { return 42; } -------------- $ llvm-gcc -emit-llvm -c bar.cpp Now running bar.o through llvm-dis gives: -------------------------------- define i32 @_Z3barv() nounwind { < clip > } -------------------------------- Above, function 'bar' has been renamed to '_Z3barv'. If, however, 'bar.cpp' is renamed 'bar.c', we get 'define i32 @bar()' as expected. I'm currently running precompiled llvm-gcc binaries...
2009 Jun 17
0
[LLVMdev] Why are functions renamed for .cpp files with llvm-gcc?
...> llvm-gcc compiles .c and .cpp files. > > Example: > > ---bar.cpp---- > int bar() { > return 42; > } > -------------- > > $ llvm-gcc -emit-llvm -c bar.cpp > > Now running bar.o through llvm-dis gives: > -------------------------------- > define i32 @_Z3barv() nounwind { > < clip > > } > -------------------------------- > > Above, function 'bar' has been renamed to '_Z3barv'. > > If, however, 'bar.cpp' is renamed 'bar.c', > we get 'define i32 @bar()' as expected. The answer is: C++...
2014 Feb 17
3
[LLVMdev] [cfe-dev] Unwind behaviour in Clang/LLVM
...hich will try to remove the unnecessary exception handling informantion. For example, the following code: define void @foo() { entry: ret void } will be converted to: define void @foo() nounwind { entry: ret void } Here's a much more complex example: define void @foo() { declare void @_Z3barv() declare i32 @__gxx_personality_v0(...) define void @_Z3foov() { entry: invoke void @_Z3barv() to label %try.cont unwind label %lpad lpad: %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) catch i8* null ret void try.cont: ret void...
2014 Feb 15
2
[LLVMdev] [cfe-dev] Unwind behaviour in Clang/LLVM
I'd love to hear more details. Are you saying that this infinite loop is a limitation of EHABI table format, and not something that can be fixed in the compiler? Meanwhile, please notice that gcc behavior matches current clang behavior that I described above. We would not want to create an incompatibility. On Fri, Feb 14, 2014 at 8:42 PM, Logan Chien <tzuhsiang.chien at gmail.com>
2009 Jun 17
0
[LLVMdev] Why are functions renamed for .cpp files with llvm-gcc?
A. Vuori wrote: > Above, function 'bar' has been renamed to '_Z3barv'. > > If, however, 'bar.cpp' is renamed 'bar.c', > we get 'define i32 @bar()' as expected. This is not llvm-gcc specific; it happens for regular gcc too. It's needed to support overloading multiple functions called 'bar' with different parameters,...
2009 Jun 17
1
[LLVMdev] Why are functions renamed for .cpp files with llvm-gcc?
...;> Example: >> >> ---bar.cpp---- >> int bar() { >> return 42; >> } >> -------------- >> >> $ llvm-gcc -emit-llvm -c bar.cpp >> >> Now running bar.o through llvm-dis gives: >> -------------------------------- >> define i32 @_Z3barv() nounwind { >> < clip > >> } >> -------------------------------- >> >> Above, function 'bar' has been renamed to '_Z3barv'. >> >> If, however, 'bar.cpp' is renamed 'bar.c', >> we get 'define i32 @bar()' a...
2012 Aug 30
1
[LLVMdev] LoadInst::getAlignment
...e ans; void bar() { ans = foo(0); } Produces: target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 2:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64" target triple = "armv4t---eabi" @ans = global double 0.000000e+00, align 8 define void @_Z3barv() { entry: %call = call double* @_Z3fooPv(i8* null) %0 = load double* %call store double %0, double* @ans, align 8 ret void } declare double* @_Z3fooPv(i8*) Notice that the load does not have an alignment specification. Thanks for your help, Jon -------------- next part --------------...
2020 Sep 16
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
...reg0 RAX). // Compile with clang -O2 -g int baz(); int bar2(int arg) { return arg * 4; } int bar() { return bar2(1); } int foo() { int a = baz() + bar() - 4; return a * 2; } ; Eventually becomes the IR... %call = call i32 @_Z3bazv(), !dbg !25 %call1 = call i32 @_Z3barv(), !dbg !26 %add = add nsw i32 %call, %call1, !dbg !27 %sub = sub nsw i32 %add, 4, !dbg !28 call void @llvm.dbg.value(metadata i32 %sub, metadata !24, metadata !DIExpression()), !dbg !29 %mul = mul nsw i32 %sub, 2, !dbg !30 ret i32 %mul, !dbg !31 ; Combine redundant instructions, "a...
2014 Apr 01
6
[LLVMdev] Proposal: Loads/stores with deterministic trap/unwind behavior
...2b5/attachment-0002.patch> -------------- next part -------------- ; RUN: llvm-as < %s | llvm-dis > %t1.ll ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll @_ZTIc = external constant i8* @_ZTId = external constant i8* @_ZTIPKc = external constant i8* define i8 @_Z3barv(i8* %ptr) uwtable optsize ssp { entry: %v = iload i8* %ptr to label %try.cont unwind label %lpad try.cont: ; preds = %entry, %invoke.cont4 ret i8 %v lpad: ; preds = %entry %exn = landingpad {i8*, i...
2011 Jul 28
0
[LLVMdev] LLVMdev Digest, Vol 85, Issue 50
...maps. What compiler are you talking about, and on what platform? The results I'm seeing clearly have both gcc and clang on Darwin generating different LSDAs for your cleanup examples and your catch-all examples. Here is the output I see from gcc-4.2 for your cleanup example: .text .globl __Z3barv __Z3barv: LFB2: pushq %rbp LCFI0: movq %rsp, %rbp LCFI1: pushq %rbx LCFI2: subq $40, %rsp LCFI3: leaq -17(%rbp), %rdi call __ZN3BobC1Ev leaq -18(%rbp), %rdi call __ZN3BobC1Ev leaq -19(%rbp), %rdi call __ZN3BobC1Ev LEHB0: call __Z3foov LEHE0: <snip> .section __TEXT,__gcc_except_t...
2011 Jul 28
2
[LLVMdev] LLVMdev Digest, Vol 85, Issue 50
John, I'm still not sure what you're talking about, I have included the assembly output from two compilations, one with a user explicit catch-all, one with only an implicit cleanup, the DWARF Action Table and Types Table are absolutely identical, as are the indexes used to reference the Action Table from the region maps. -Peter Lawrence.
2020 Sep 15
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
Hi Adrian & Stephen, One thought here: But — not all memory locations are l-values. If we have a DWARF location list for variable "x" which points to a memory address for the first n instructions and the switches to a constant for the remainder of the scope, the memory address is not guaranteed to be an l-value, because writing the the memory address cannot affect the later part of
2011 Jul 23
0
[LLVMdev] RFC: Exception Handling Rewrite
...al constant i8* > @.str = private unnamed_addr constant [19 x i8] c"caught integer %d\0A\00", align 1 > @.str1 = private unnamed_addr constant [18 x i8] c"caught double %g\0A\00", align 1 > > define i32 @_Z3foov() uwtable optsize ssp { > entry: > invoke void @_Z3barv() optsize > to label %try.cont unwind label %lpad > > invoke.cont7: > %tmp0 = tail call i8* @__cxa_begin_catch(i8* %exn) nounwind > %tmp1 = bitcast i8* %tmp0 to i32* > %exn.scalar = load i32* %tmp1, align 4 > %call = tail call i32 (i8*, ...)* @printf(i8* getelemen...
2011 Jul 23
14
[LLVMdev] RFC: Exception Handling Rewrite
...constant i8* @_ZTId = external constant i8* @.str = private unnamed_addr constant [19 x i8] c"caught integer %d\0A\00", align 1 @.str1 = private unnamed_addr constant [18 x i8] c"caught double %g\0A\00", align 1 define i32 @_Z3foov() uwtable optsize ssp { entry: invoke void @_Z3barv() optsize to label %try.cont unwind label %lpad invoke.cont7: %tmp0 = tail call i8* @__cxa_begin_catch(i8* %exn) nounwind %tmp1 = bitcast i8* %tmp0 to i32* %exn.scalar = load i32* %tmp1, align 4 %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([19 x i8]* @.st...
2009 Nov 24
0
[LLVMdev] RFC: New Exception Handling Proposal
...{ > printf("s == %s\n", s); > } catch (...) { > printf("catch-all\n"); > } > } > > The llvm IR for foo looks similar to this (simplified for readability): > > define void @_Z3foov() { > entry: > invoke void @_Z3barv() > to label %return unwind label %lpad > > return: > ret void > > lpad: > %eh_ptr = tail call i8* @llvm.eh.exception() > %eh_select27 = tail call i32 (i8*, i8*, ...)* > @llvm.eh.selector(i8* %eh_ptr, > i8* @_...
2009 Nov 18
11
[LLVMdev] RFC: New Exception Handling Proposal
...uot;i == %d\n", i); } catch (const char *s) { printf("s == %s\n", s); } catch (...) { printf("catch-all\n"); } } The llvm IR for foo looks similar to this (simplified for readability): define void @_Z3foov() { entry: invoke void @_Z3barv() to label %return unwind label %lpad return: ret void lpad: %eh_ptr = tail call i8* @llvm.eh.exception() %eh_select27 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* @__gxx_personality_v0, i8...
2010 Dec 01
10
[LLVMdev] RFC: Exception Handling Proposal Revised
...gn 1 @.str1 = private constant [19 x i8] c"caught string: %s\0A\00", align 1 @.str2 = private constant [9 x i8] c"catchall\00", align 1 @_ZTIi = external constant %struct.__fundamental_type_info_pseudo @_ZTIPKc = external constant %struct.__pointer_type_info_pseudo define void @_Z3barv() optsize ssp { entry: %a = alloca %struct.A, align 8 %b = alloca %struct.B, align 8 %c = alloca %struct.C, align 8 invoke void @_Z3foov() to label %invcont unwind label %catch.handlers invcont: invoke void @_Z3foov() to label %invcont1 unwind label %a.dtor invcont1:...
2010 Dec 01
8
[LLVMdev] Alternative exception handling proposal
....str2 = private constant [9 x i8] c"catchall\00", align 1 @llvm.eh.catch.all.value = linkonce constant i8* null, section "llvm.metadata" @llvm.used = appending global [1 x i8*] [i8* bitcast (i8** @llvm.eh.catch.all.value to i8*)], section "llvm.metadata" define void @_Z3barv() { entry: %memtmp = alloca %struct.A, align 8 %memtmp1 = alloca %struct.A, align 8 %memtmp2 = alloca %struct.A, align 8 invoke void @_Z3foov() to label %"3" unwind label %lpad personality @__gxx_personality_v0 catches %struct.__fundamental_type_info_pseudo* @_ZTIi...