similar to: [LLVMdev] [patch] emit .weak for zero initialized weak variables

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] [patch] emit .weak for zero initialized weak variables"

2006 Dec 18
2
[LLVMdev] [patch] emit .weak for zero initialized weak variables
> I'm not sure this is right. C code like this: > > int X; > > should compile to a .comm directive, not a .weak directive, right? right. According to GCC, "int x" should compile to ".comm x", but "int x __attribute__((weak))" should compile to --------------- .weak x x: .zero 4 --------------- It looks like we have a bug in
2006 Dec 16
0
[LLVMdev] [patch] emit .weak for zero initialized weak variables
On Sat, 9 Dec 2006, [UTF-8] Rafael Esp?ndola wrote: > The attached patches makes all backends print a .weak directive for > zero initialized variables. GCC does it on x86-64 and ARM. I assume > that it should be done on all architectures. > > The patch also adds a test to the ARM backend? Should I copy it to all > backends? I'm not sure this is right. C code like this:
2006 Dec 19
0
[LLVMdev] [patch] emit .weak for zero initialized weak variables
On Mon, 18 Dec 2006, [UTF-8] Rafael Esp?ndola wrote: >> I'm not sure this is right. C code like this: >> >> int X; >> >> should compile to a .comm directive, not a .weak directive, right? > > right. > > According to GCC, "int x" should compile to ".comm x", but "int x > __attribute__((weak))" should compile to >
2006 Dec 09
1
[LLVMdev] [PATCH] print .weak directives
> I'm sorry, I must be missing something here: > > In order to have weak linkage (I'm ignoring external weak for the moment) > a global has to be defined in the LLVM code. Because it is defined in the > LLVM code, it will have to be printed out by the target asm printer > somewhere. When that happens, it will get a .weak directive emitted for > it. It should, but
2006 Dec 09
2
[LLVMdev] [PATCH] print .weak directives
The attached patch makes the AsmPrinter emit one .weak directive for each weak global variable that is referenced at least once in a global table. It uses a std::set to print only one directive. Thoughts? Best Regards, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch Type: text/x-patch Size: 2945 bytes Desc: not available URL:
2006 Dec 09
0
[LLVMdev] [PATCH] print .weak directives
On Sat, 9 Dec 2006, [UTF-8] Rafael Esp?ndola wrote: > The attached patch makes the AsmPrinter emit one .weak directive for > each weak global variable that is referenced at least once in a global > table. It uses a std::set to print only one directive. I'm sorry, I must be missing something here: In order to have weak linkage (I'm ignoring external weak for the moment) a global
2006 Dec 26
1
[LLVMdev] [patch] emit .weak for zero initialized weak variables
> Is there a semantic difference between the two? Just because GCC compiles > them to different things, it doesn't mean they do different things... Sorry for the long delay... On a x86 box I am able to use both declarations interchangeably. There is a problem if we have both a declaration and an use on the same file: We must print a ".weak" because of the use, but if we
2006 Dec 06
2
[LLVMdev] weak linkage
I am implementing weak linkage support on the ARM backend and I noticed this code on the X86 and PPC backends: ------------------------------------------------ // If the initializer is a extern weak symbol, remember to emit the weak // reference! if (const GlobalValue *GV = dyn_cast<GlobalValue>(C)) if (GV->hasExternalWeakLinkage()) ExtWeakSymbols.insert(Mang->getValueName(GV));
2006 Dec 09
2
[LLVMdev] [patch] move ExtWeakSymbols to AsmPrinter
The attached patch moves the ExtWeakSymbols to the AsmPrinter class and the code that emits the ".weak" directives to AsmPrinter::doFinalization. This is just code factoring. No functionality changes. Best Regards, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch Type: text/x-patch Size: 5387 bytes Desc: not available URL:
2006 Dec 07
2
[LLVMdev] [patch] print ".weak" directive
The attached patch makes the ASM printer print the ".weak" directive when a weak symbol is added to a constant pool. I need something similar to it in order to bootstrap gcc on ARM. Any comments? Best Regards, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: llvm.patch Type: text/x-patch Size: 1816 bytes Desc: not available URL:
2006 Dec 06
0
[LLVMdev] weak linkage
On Wed, 6 Dec 2006, [UTF-8] Rafael Esp?ndola wrote: > I am implementing weak linkage support on the ARM backend and I > noticed this code on the X86 and PPC backends: > ------------------------------------------------ > // If the initializer is a extern weak symbol, remember to emit the weak > // reference! > if (const GlobalValue *GV = dyn_cast<GlobalValue>(C)) > if
2004 Jun 18
1
[LLVMdev] Linkages handling
Hello, looking at Printer::doFinalization, I have some question about support of the different linkages. Here's a table of how that method handles the possible combinations: Initialized Null Internal .data, local .data, .comm, .local External .data, .globl .bss, .globl,
2006 Dec 08
0
[LLVMdev] [patch] print ".weak" directive
On Thu, 7 Dec 2006, [UTF-8] Rafael Esp?ndola wrote: > The attached patch makes the ASM printer print the ".weak" directive > when a weak symbol is added to a constant pool. > > I need something similar to it in order to bootstrap gcc on ARM. --- lib/CodeGen/AsmPrinter.cpp 7 Dec 2006 01:30:31 -0000 1.120 +++ lib/CodeGen/AsmPrinter.cpp 7 Dec 2006 13:00:17 -0000 @@
2006 Dec 06
2
[LLVMdev] MachineConstantPoolValue
In the ARM backend, functions (and other 32 bit constants) are placed in a pool and loaded when needed. A problem with this is that ".weak" directives must be printed in the pool. This is not supported in the standard printer, so I think that I have found the first use for MachineConstantPoolValue :-) Creating the constant is easy, but I have two problems: 1) what are the methods
2012 Jun 12
2
[LLVMdev] [NVPTX] For linkonce_odr NVPTX generates .weak, but even newest PTXAS can't handle it
Dear LLVM NVPTX maintainers, Just to have the issue recorded, I don't know how important it is: clang generates linkonce_odr out of __inline__, and NVPTX generates .weak out of linkonce_odr (how it happens - a big question, btw, because I can't find anything related in NVPTX asm printer - does it chain to some other printer?), and finally ptxas (both 4.2 and 5) fails to compile it to
2012 Jun 13
0
[LLVMdev] [NVPTX] For linkonce_odr NVPTX generates .weak, but even newest PTXAS can't handle it
On Tue, Jun 12, 2012 at 6:11 PM, Dmitry N. Mikushin <maemarcus at gmail.com>wrote: > Dear LLVM NVPTX maintainers, > > Just to have the issue recorded, I don't know how important it is: > > clang generates linkonce_odr out of __inline__, and NVPTX generates .weak > out of linkonce_odr (how it happens - a big question, btw, because I can't > find anything related
2014 Oct 29
4
[LLVMdev] Emit a jump instruction to a place inside basicblock
Hi all, I'm a beginner in LLVM. Currently, I want to implement a pass that generates a jump table. The entry in that table is a jump to some place (may be an instruction) in a basic block. I'm reading the JumpTable code in llvm 3.5, there is a table which contains jump entries to functions. In AsmPrinter::doFinalization function from file lib/CodeGen/AsmPrinter/AsmPrinter.cpp, it gets a
2006 Dec 10
0
[LLVMdev] [patch] move ExtWeakSymbols to AsmPrinter
On Sat, 9 Dec 2006, [UTF-8] Rafael Esp?ndola wrote: > The attached patch moves the ExtWeakSymbols to the AsmPrinter class > and the code that emits the ".weak" directives to > AsmPrinter::doFinalization. > > This is just code factoring. No functionality changes. Looks good, one request though: if practical, it would be nice to switch this to be set<GlobalValue*>
2010 Dec 05
1
[LLVMdev] Weak private linkage for Objective C
Hi all, I've been subscribed to this list on-and-off and always found it very helpful. I'm facing the problem of compiling a project in Objective C with LLVM in a Darwin environment. There is a certain Objective C protocol that appears in two .m files, and so the corresponding l_OBJC_PROTOCOL and l_OBJC_LABEL_PROTOCOL symbols appear in both .o files. The problem is that while these
2015 Dec 08
2
weak definitions in LTO
Hi, I have a question regarding the behavior of weak symbol resolution in LTO: Suppose there are weak definitions in both the source code and some native lib. In non-LTO path, we will use the version from source code. In LTO path, LLVM may discard the definition as it has "linkeonce" linkage type. So the native version will be selected by linker. Now, non-LTO and LTO build may have