search for: _znwj

Displaying 11 results from an estimated 11 matches for "_znwj".

Did you mean: _znwm
2010 Oct 15
5
[LLVMdev] How do I find all memory allocations in an llvm ir code file?
...mpile this snippet of C++ code: void FuncTest() {     int* a = new int;     int* b = new int[2]; } using: clang test.cpp -S -emit-llvm -o - > test.llvm and obtained this: define void @_Z8FuncTestv() { entry:   %a = alloca i32*, align 4   %b = alloca i32*, align 4   %call = call noalias i8* @_Znwj(i32 4)   %0 = bitcast i8* %call to i32*   store i32* %0, i32** %a, align 4   %call1 = call noalias i8* @_Znaj(i32 8)   %1 = bitcast i8* %call1 to i32*   store i32* %1, i32** %b, align 4   ret void } declare noalias i8* @_Znwj(i32) declare noalias i8* @_Znaj(i32) What I am wondering now is: where...
2010 Oct 15
0
[LLVMdev] How do I find all memory allocations in an llvm ir code file?
...t; > int* b = new int[2]; > } > > using: > > clang test.cpp -S -emit-llvm -o -> test.llvm > > and obtained this: > > define void @_Z8FuncTestv() { > entry: > %a = alloca i32*, align 4 > %b = alloca i32*, align 4 > %call = call noalias i8* @_Znwj(i32 4) > %0 = bitcast i8* %call to i32* > store i32* %0, i32** %a, align 4 > %call1 = call noalias i8* @_Znaj(i32 8) > %1 = bitcast i8* %call1 to i32* > store i32* %1, i32** %b, align 4 > ret void > } > > declare noalias i8* @_Znwj(i32) > declare noal...
2008 Jul 23
2
[LLVMdev] weird function
Hi, I have tried to compile a simple cpp file with llvm-gcc. I have attached the assemble file here. I see a weird thing there. There are some call instructions, they call the function "@_Znwj". But this function was only declared in the file, there is no definition of it. So, how can it work, if this function is "empty" ? Thanks for any advice. Quang -------------- next part -------------- A non-text attachment was scrubbed... Name: simple01.ll Type: application/octet...
2008 Jul 23
2
[LLVMdev] weird function
On Jul 23, 2008, at 11:31 AM, Duncan Sands wrote: >> I have tried to compile a simple cpp file with llvm-gcc. I have >> attached >> the assemble file here. >> I see a weird thing there. There are some call instructions, they >> call the >> function "@_Znwj". But this function was only declared in the file, >> there is >> no definition of it. So, how can it work, if this function is >> "empty" ? > > When you create a final executable using llvm-g++ it links with some > standard > C++ libraries. Proba...
2008 Jul 23
0
[LLVMdev] weird function
> I have tried to compile a simple cpp file with llvm-gcc. I have attached > the assemble file here. > I see a weird thing there. There are some call instructions, they call the > function "@_Znwj". But this function was only declared in the file, there is > no definition of it. So, how can it work, if this function is "empty" ? When you create a final executable using llvm-g++ it links with some standard C++ libraries. Probably @_Znwj is defined in one of those libraries...
2008 Jul 23
1
[LLVMdev] weird function
llvm-gcc is the C compiler, but you're trying to compile a C++ file. "@_Znwj" looks like part of a C++ symbol. Try llvm-g++ instead, that should help. - Simon 2008/7/23 Le Anh Quang <anh_quang.le at mailbox.tu-dresden.de>: > Hi, > I have tried to compile a simple cpp file with llvm-gcc. I have attached > the assemble file here. > I see a weird...
2008 Jul 24
0
[LLVMdev] weird function
...On Jul 23, 2008, at 11:31 AM, Duncan Sands wrote: >> I have tried to compile a simple cpp file with llvm-gcc. I have >> attached >> the assemble file here. >> I see a weird thing there. There are some call instructions, they >> call the >> function "@_Znwj". But this function was only declared in the file, >> there is >> no definition of it. So, how can it work, if this function is >> "empty" ? > > When you create a final executable using llvm-g++ it links with some > standard > C++ libraries. Proba...
2008 Jul 24
0
[LLVMdev] weird function
...mple processor simulator, which can execute LLVM bitcode. So it must deal with the virtual LLVM instruction set. As I compiled a C or C++ program using llvm-gcc or llvm-g++, I have a bitcode file. If a C++ library is used, some functions will be declared inside it, but not defined there (like the @_Znwj). Is it possible to create LLVM IR with all libraries defined inside (or linked with another bitcode libraries) ? Maybe it looks like that: .... %tmp183 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([13 x i8]* @.str1, i32 0, i32 0), i32 %tmp182 ) nounwind tail call void @_ZdlPv( i8* %t...
2008 Jul 24
2
[LLVMdev] weird function
Hi, > thank for your answer. Is there any document/tutorial about linking > bytecode file with libstdc++ avaiable ? first you need to compile the bitcode to assembler using llc. For example: llc bitcode.bc This produces bitcode.s. Turn this into a executable using: llvm-g++ -o bitcode bitcode.s or g++ -o bitcode bitcode.s It doesn't matter which g++ you use here. Using g++
2008 Jul 24
1
[LLVMdev] weird function
Hi Quang, > As I compiled a C or C++ program using llvm-gcc or llvm-g++, I have a > bitcode file. If a C++ library is used, some functions will be declared > inside it, but not defined there (like the @_Znwj). Is it possible to create > LLVM IR with all libraries defined inside (or linked with another bitcode > libraries) ? I don't know how hard it would be to compile the C++ standard library to bitcode. I've done this for Ada (which also has a substantial runtime and standard library):...
2007 Mar 05
1
[LLVMdev] building llvm head on ubuntu with glibc-2.3.6
...Core/Debug/Intrinsics.gen.tmp -gen-intrinsic *** glibc detected *** /home/ubuntu/llvm/obj/Debug/bin/tblgen: malloc(): memory corruption: 0x081f8a70 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0x401b81cd] /lib/tls/i686/cmov/libc.so.6(malloc+0x7f)[0x401b983f] /usr/lib/libstdc++.so.6(_Znwj+0x27)[0x400f24b7] /usr/lib/libstdc++.so.6(_Znaj+0x1d)[0x400f25ed] /usr/lib/libstdc++.so.6(_ZNSt13basic_filebufIcSt11char_traitsIcEE27_M_allocate_internal_bufferEv+0x3c)[0x4009558c] /usr/lib/libstdc++.so.6(_ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode+0x72)[0x40099772] /usr/lib...