Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] [lld] Wrong references for C++ COMDAT groups"
2015 May 07
2
[LLVMdev] [lld] Wrong references for C++ COMDAT groups
Looks like it is also not working on x86_64, using clang/lld I am seeing
a segmentation fault:
Dump of assembler code for function _Z4funcj:
0x0000000000400590 <+0>: push %rbp
0x0000000000400591 <+1>: push %rbx
0x0000000000400592 <+2>: push %rax
0x0000000000400593 <+3>: mov %edi,%ebp
0x0000000000400595 <+5>: pop %rdx
0x0000000000400596
2014 Jul 28
2
[LLVMdev] [lld] question on ELF section formating
I've been adding ELF/AArch64 support to lld based off the existing x86_64
code that is already there in lld. I've been able to compile and link a
simple "Hello World"-type program. However, I'm getting what appears to be a
misplacement/name change of the _start atom. When I do the link, the _start
section gets named __tls_get_addr. The code inside this section appears to
be
2015 Dec 20
2
C interface for COMDAT and new windows exception instructions?
As the topic says, are there any plans for adding this before the 3.8 release?
Cheers, Jakob.
2017 Jul 31
2
[RFC] Profile guided section layout
A rebased version of the lld patch is attached.
Cheers,
Rafael
On 31 July 2017 at 15:11, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
> Tobias Edler von Koch <tobias at codeaurora.org> writes:
>
>> Hi Rafael,
>>
>> On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote:
>>> However, do we need to start with
2017 Dec 20
2
Dropping COMDAT with LTO
I've been digging into COMDAT with regular LTO, specifically in the
context of the LLVM gold plugin. The GCC WHOPR documentation specifies
that the linker will resolve all COMDAT groups to the IR-provided
definitions, if available. Additionally it specifies that "When the
WPA phase produces the definition of the COMDAT symbol in a new object
file, that definition should not be in a COMDAT
2020 Jan 24
4
ORC JIT Weekly #2 -- COFF COMDAT Constants and Emulated TLS
Hi All,
This week I've been focused on removing some of the blockers for people transitioning from ORCv1 to ORCv2.
Issue #1 (http://llvm.org/PR40074, http://llvm.org/PR44337):
When LLVM codegens floating point constants for COFF we produce named constant pool entries of the form __real@<bitval>. These are stored in COFF COMDAT sections [1] which allow duplicate symbol definitions to
2011 Dec 09
0
[LLVMdev] Implementing devirtualization
On Thu, Dec 8, 2011 at 2:11 PM, Vitor Luis Menezes <vitor at utexas.edu> wrote:
> We've got the following test case:
>
>
> class A {
> public:
> int x;
> A(int x) : x(x) {}
> int hoo() {return 4;}
> virtual int foo() {return x;}
> virtual int goo() {return foo()+10;}
> virtual int operator+(A &a) {
> return x + a.x;
> }
> };
2011 Dec 08
2
[LLVMdev] Implementing devirtualization
We've got the following test case:
class A {
public:
int x;
A(int x) : x(x) {}
int hoo() {return 4;}
virtual int foo() {return x;}
virtual int goo() {return foo()+10;}
virtual int operator+(A &a) {
return x + a.x;
}
};
class B : public A {
public:
B(int x) : A(x) {}
int hoo() {return 2;}
virtual int foo() {return A::foo()*2;}
};
int main() {
A* a = new A(1);
2013 Mar 11
2
[LLVMdev] How to detect all free() calls
Hi,
I'm trying to write a pass to detect all free()/delete() call instructions in LLVM IR.The method is as follows.
First I find Call Instructions: CallInst *CI=dyn_cast<CallInst>(&*i);
then see if the Function name matches:
name=CI->getCalledFunction()->getName(); if(name=="_ZdlPv"||name=="_ZdaPv"||name=="free")
2012 May 22
4
[LLVMdev] How to get llvm bitcode executed
Hi All,
I have a program that uses C++ STL a lot. To have the source code for
STL functions, I undefined "_GLIBCXX_EXTERN_TEMPLATE" in
c++config.h. In spite of this, after compilation (via clang) and
linking (via llvm-ld), the resulting bitcode contains a few declared
functions (with no definitions).
My question is: In the scenario where some function definitions are
missing in a llvm
2013 Mar 11
2
[LLVMdev] How to detect all free() calls
Thanks. isFreeCall() works well but for
%call2 = call i32 bitcast (i32 (...)* @free to i32 (i8*)*)(i8* %call1) nounwind, !dbg !16
So I tried to figure out when the above instruction occurred.
When <stdlib.h> is included, free(buf2R1); turn into call void @free(i8* %call1) nounwind, !dbg !16
when I forget to include <stdlib.h>, free(buf2R1); turn into %call2 = call i32 bitcast (i32
2014 Jun 20
2
[LLVMdev] [AArch64] Question about far call
Hi,
For the following code:
void foo ();
int main () {foo();}
llvm emits "bl foo"
Then I set foo at a far address in linking:
aarch64-linux-gnu-gcc -Wl,--defsym=foo=0x80000000 a.o -o a.exe
I got an error from ld:
a.c:(.text+0x8): relocation truncated to fit: R_AARCH64_CALL26 against
symbol `foo' define in *ABS* section in a.exe
The question is: do I
2012 May 22
2
[LLVMdev] How to get llvm bitcode executed
Thanks Duncan and Ashok,
As Duncan described, "lli -load=libstdc++.dylib ..." works. I,
however, encounted an "Illegal instruction" message, while I was
trying to interpret a large program. So, does lli have a debug switch
for dumping out the details for errors?
Using llc is not that simple, and I have not gotten through the
compilation process. For instance, "llc -o
2012 May 22
0
[LLVMdev] How to get llvm bitcode executed
Guess I have found some clues. Some necessary libraries have to be
loaded while trying to generate native code or do interpretation. Then
another question emerges: Is there a way to determine the necessary
libraries in need? And where to locate these necessary libraries?
Xiaolong
> Hi All,
>
> I have a program that uses C++ STL a lot. To have the source code for
> STL functions, I
2009 Aug 11
6
[LLVMdev] Build issues on Solaris
Hi all,
I've encountered a couple of minor build issues on Solaris that
have crept in since 2.5, fixes below:
1. In lib/Target/X86/X86JITInfo.cpp, there is:
// Check if building with -fPIC
#if defined(__PIC__) && __PIC__ && defined(__linux__)
#define ASMCALLSUFFIX "@PLT"
#else
#define ASMCALLSUFFIX
#endif
Which causes a link failure due to the non-PLT
2013 Mar 11
0
[LLVMdev] How to detect all free() calls
if you don't include stdlib.h, where free() is declared, you'll simply
get a default C function signature:
int free(...);
On Mon, Mar 11, 2013 at 1:56 AM, Jane <270611649 at qq.com> wrote:
> Thanks. isFreeCall() works well but for
> %call2 = call i32 bitcast (i32 (...)* @free to i32 (i8*)*)(i8* %call1)
> nounwind, !dbg !16
> So I tried to figure out when the above
2011 Dec 08
0
[LLVMdev] Implementing devirtualization
On Thu, Dec 8, 2011 at 9:56 AM, Vitor Luis Menezes <vitor at utexas.edu> wrote:
> Hello all,
>
> Our compilers class has been using LLVM, and a partner and I decided to
> implement devirtualization of virtual C++ calls in LLVM as a class project.
> We quickly realized that existing debug metadata generated by Clang didn't
> give us enough info to (precisely) implement
2012 May 22
0
[LLVMdev] How to get llvm bitcode executed
Hi Xialong,
> I have a program that uses C++ STL a lot. To have the source code for
> STL functions, I undefined "_GLIBCXX_EXTERN_TEMPLATE" in
> c++config.h. In spite of this, after compilation (via clang) and
> linking (via llvm-ld), the resulting bitcode contains a few declared
> functions (with no definitions).
>
> My question is: In the scenario where some
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++
2012 May 23
0
[LLVMdev] How to get llvm bitcode executed
Hi Xiaolong,
> As Duncan described, "lli -load=libstdc++.dylib ..." works. I,
> however, encounted an "Illegal instruction" message, while I was
> trying to interpret a large program.
are you using the interpreter or the JIT?
So, does lli have a debug switch
> for dumping out the details for errors?
>
> Using llc is not that simple, and I have not gotten