| #
506b6170 |
| 23-Sep-2020 |
Zequan Wu <[email protected]> |
Reland [CodeGen] emit CG profile for COFF object file
This reverts commit 90242caca2074dab5a9b76e5bc36d9fafd2179a7.
Error fixed at f5435399e823746bbe1737b95c853d77a42e1ac3
Differential Revision: h
Reland [CodeGen] emit CG profile for COFF object file
This reverts commit 90242caca2074dab5a9b76e5bc36d9fafd2179a7.
Error fixed at f5435399e823746bbe1737b95c853d77a42e1ac3
Differential Revision: https://reviews.llvm.org/D87811
show more ...
|
| #
90242cac |
| 22-Sep-2020 |
Reid Kleckner <[email protected]> |
Revert "[CodeGen] emit CG profile for COFF object file"
This reverts commit 91aed9bf975f1e4346cc8f4bdefc98436386ced2, it is causing link errors.
|
| #
9932561b |
| 18-Sep-2020 |
Reid Kleckner <[email protected]> |
[COFF] Move per-global .drective emission from AsmPrinter to TLOFCOFF
This changes the order of output sections and the output assembly, but is otherwise NFC.
It simplifies the TLOF interface by re
[COFF] Move per-global .drective emission from AsmPrinter to TLOFCOFF
This changes the order of output sections and the output assembly, but is otherwise NFC.
It simplifies the TLOF interface by removing two COFF-only methods.
show more ...
|
| #
91aed9bf |
| 17-Sep-2020 |
Zequan Wu <[email protected]> |
[CodeGen] emit CG profile for COFF object file
I forgot to add emission of CG profile for COFF object file, when adding the support (https://reviews.llvm.org/D81775)
Differential Revision: https://
[CodeGen] emit CG profile for COFF object file
I forgot to add emission of CG profile for COFF object file, when adding the support (https://reviews.llvm.org/D81775)
Differential Revision: https://reviews.llvm.org/D87811
show more ...
|
| #
82d07497 |
| 25-Aug-2020 |
Fangrui Song <[email protected]> |
[TargetLoweringObjectFileImpl] Make .llvmbc and .llvmcmd non-SHF_ALLOC
There are two ways .llvmbc can be produced:
* clang -c -fembed-bitcode=all (which also produces .llvmcmd) * LTO backend: ld.ll
[TargetLoweringObjectFileImpl] Make .llvmbc and .llvmcmd non-SHF_ALLOC
There are two ways .llvmbc can be produced:
* clang -c -fembed-bitcode=all (which also produces .llvmcmd) * LTO backend: ld.lld -mllvm -lto-embed-bitcode or -plugin-opt=-lto-embed-bitcode
.llvmbc and .llvmcmd have the SHF_ALLOC flag, so they can be dropped by --gc-sections.
This patch sets SectionKind::Metadata to drop the SHF_ALLOC flag. This is conceptually correct: the two sections are not part of the process image, so SHF_ALLOC is not appropriate.
`test/LTO/X86/embed-bitcode.ll`: changed `llvm-objcopy -O binary --only-section` to `llvm-objcopy --dump-section`. `-O binary` does not dump non-SHF_ALLOC sections.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D86374
show more ...
|
| #
e9ac1495 |
| 11-Aug-2020 |
diggerlin <[email protected]> |
[AIX][XCOFF] change the operand of branch instruction from symbol name to qualified symbol name for function declarations
SUMMARY:
1. in the patch , remove setting storageclass in function .getXCO
[AIX][XCOFF] change the operand of branch instruction from symbol name to qualified symbol name for function declarations
SUMMARY:
1. in the patch , remove setting storageclass in function .getXCOFFSection and construct function of class MCSectionXCOFF there are
XCOFF::StorageMappingClass MappingClass; XCOFF::SymbolType Type; XCOFF::StorageClass StorageClass; in the MCSectionXCOFF class, these attribute only used in the XCOFFObjectWriter, (asm path do not need the StorageClass)
we need get the value of StorageClass, Type,MappingClass before we invoke the getXCOFFSection every time.
actually , we can get the StorageClass of the MCSectionXCOFF from it's delegated symbol.
2. we also change the oprand of branch instruction from symbol name to qualify symbol name. for example change bl .foo extern .foo to bl .foo[PR] extern .foo[PR]
3. and if there is reference indirect call a function bar. we also add extern .bar[PR]
Reviewers: Jason liu, Xiangling Liao
Differential Revision: https://reviews.llvm.org/D84765
show more ...
|
| #
20abff04 |
| 10-Aug-2020 |
jasonliu <[email protected]> |
[XCOFF][AIX] Use TE storage mapping class when large code model is enabled
Summary: Use TE SMC instead of TC SMC in large code model mode, so that large code model TOC entries could get placed after
[XCOFF][AIX] Use TE storage mapping class when large code model is enabled
Summary: Use TE SMC instead of TC SMC in large code model mode, so that large code model TOC entries could get placed after all the small code model TOC entries, which reduces the chance of TOC overflow.
Reviewed By: Xiangling_L
Differential Revision: https://reviews.llvm.org/D85455
show more ...
|
| #
6ef801aa |
| 15-Jul-2020 |
Xiangling Liao <[email protected]> |
[AIX] Static init frontend recovery and backend support
On the frontend side, this patch recovers AIX static init implementation to use the linkage type and function names Clang chooses for sinit re
[AIX] Static init frontend recovery and backend support
On the frontend side, this patch recovers AIX static init implementation to use the linkage type and function names Clang chooses for sinit related function.
On the backend side, this patch sets correct linkage and function names on aliases created for sinit/sterm functions.
Differential Revision: https://reviews.llvm.org/D84534
show more ...
|
| #
e5062a6c |
| 06-Aug-2020 |
jasonliu <[email protected]> |
[XCOFF][AIX] Put each jump table in an independent section if -ffunction-sections is specified
If a function is in a unique section, putting all jump tables in .rodata will prevent functions that h
[XCOFF][AIX] Put each jump table in an independent section if -ffunction-sections is specified
If a function is in a unique section, putting all jump tables in .rodata will prevent functions that have a jump table to get garbage collect by the linker. Therefore, we need to put jump table into a unique section as well.
Reviewed By: Xiangling_L
Differential Revision: https://reviews.llvm.org/D84761
show more ...
|
| #
11bb7c22 |
| 03-Aug-2020 |
Fangrui Song <[email protected]> |
[MC] Set sh_link to 0 if the associated symbol is undefined
Part of https://bugs.llvm.org/show_bug.cgi?id=41734
LTO can drop externally available definitions. Such AssociatedSymbol is not associate
[MC] Set sh_link to 0 if the associated symbol is undefined
Part of https://bugs.llvm.org/show_bug.cgi?id=41734
LTO can drop externally available definitions. Such AssociatedSymbol is not associated with a symbol. ELFWriter::writeSection() will assert.
Allow a SHF_LINK_ORDER section to have sh_link=0.
We need to give sh_link a syntax, a literal zero in the linked-to symbol position, e.g. `.section name,"ao",@progbits,0`
Reviewed By: pcc
Differential Revision: https://reviews.llvm.org/D72899
show more ...
|
| #
04dc9691 |
| 29-Jul-2020 |
jasonliu <[email protected]> |
[XCOFF][AIX] Enable -ffunction-sections
Summary: This patch implements -ffunction-sections on AIX. This patch focuses on assembly generation. Follow-on patch needs to handle: 1. -ffunction-sections
[XCOFF][AIX] Enable -ffunction-sections
Summary: This patch implements -ffunction-sections on AIX. This patch focuses on assembly generation. Follow-on patch needs to handle: 1. -ffunction-sections implication for jump table. 2. Object file generation path and associated testing.
Differential Revision: https://reviews.llvm.org/D83875
show more ...
|
| #
1003113e |
| 23-Jul-2020 |
Simon Pilgrim <[email protected]> |
Fix -Wparentheses warning - add missing brackets around the entire assertion condition
|
| #
b98b1700 |
| 17-Jul-2020 |
jasonliu <[email protected]> |
[XCOFF] Enable symbol alias for AIX
Summary: AIX assembly's .set directive is not usable for aliasing purpose. We need to use extra-label-at-defintion strategy to generate symbol aliasing on AIX.
R
[XCOFF] Enable symbol alias for AIX
Summary: AIX assembly's .set directive is not usable for aliasing purpose. We need to use extra-label-at-defintion strategy to generate symbol aliasing on AIX.
Reviewed By: DiggerLin, Xiangling_L
Differential Revision: https://reviews.llvm.org/D83252
show more ...
|
| #
ff5b9a7b |
| 09-Jul-2020 |
Christopher Tetreault <[email protected]> |
[SVE] Remove calls to VectorType::getNumElements from CodeGen
Reviewers: efriedma, fpetrogalli, sdesmalen, RKSimon, arsenm
Reviewed By: RKSimon
Subscribers: wdng, tschuett, hiraditya, rkruppe, psn
[SVE] Remove calls to VectorType::getNumElements from CodeGen
Reviewers: efriedma, fpetrogalli, sdesmalen, RKSimon, arsenm
Reviewed By: RKSimon
Subscribers: wdng, tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82210
show more ...
|
| #
6d3ae365 |
| 06-Jul-2020 |
jasonliu <[email protected]> |
[XCOFF][AIX] Give symbol an internal name when desired symbol name contains invalid character(s)
Summary:
When a desired symbol name contains invalid character that the system assembler could not p
[XCOFF][AIX] Give symbol an internal name when desired symbol name contains invalid character(s)
Summary:
When a desired symbol name contains invalid character that the system assembler could not process, we need to emit .rename directive in assembly path in order for that desired symbol name to appear in the symbol table.
Reviewed By: hubert.reinterpretcast, DiggerLin, daltenty, Xiangling_L
Differential Revision: https://reviews.llvm.org/D82481
show more ...
|
| #
368a5e3a |
| 29-Jun-2020 |
Guillaume Chatelet <[email protected]> |
[Alignment][NFC] migrate DataLayout::getPreferredAlignment
This patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-J
[Alignment][NFC] migrate DataLayout::getPreferredAlignment
This patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Differential Revision: https://reviews.llvm.org/D82752
show more ...
|
| #
e0bca46b |
| 02-Jun-2020 |
Sriraman Tallam <[email protected]> |
Options for Basic Block Sections, enabled in D68063 and D73674.
This patch adds clang options: -fbasic-block-sections={all,<filename>,labels,none} and -funique-basic-block-section-names. LLVM Suppor
Options for Basic Block Sections, enabled in D68063 and D73674.
This patch adds clang options: -fbasic-block-sections={all,<filename>,labels,none} and -funique-basic-block-section-names. LLVM Support for basic block sections is already enabled.
+ -fbasic-block-sections={all, <file>, labels, none} : Enables/Disables basic block sections for all or a subset of basic blocks. "labels" only enables basic block symbols. + -funique-basic-block-section-names: Enables unique section names for basic block sections, disabled by default.
Differential Revision: https://reviews.llvm.org/D68049
show more ...
|
| #
26604d06 |
| 29-May-2020 |
Xiangling Liao <[email protected]> |
[AIX] Emit AvailableExternally Linkage on AIX
Since on AIX, our strategy is to not use -u to suppress any undefined symbols, we need to emit .extern for the symbols with AvailableExternally linkage.
[AIX] Emit AvailableExternally Linkage on AIX
Since on AIX, our strategy is to not use -u to suppress any undefined symbols, we need to emit .extern for the symbols with AvailableExternally linkage.
Differential Revision: https://reviews.llvm.org/D80642
show more ...
|
| #
8d9ff231 |
| 27-May-2020 |
jasonliu <[email protected]> |
[NFC][XCOFF][AIX] Return function entry point symbol with dedicate function
Use getFunctionEntryPointSymbol whenever possible to enclose the implementation detail and reduce duplicate logic.
Differ
[NFC][XCOFF][AIX] Return function entry point symbol with dedicate function
Use getFunctionEntryPointSymbol whenever possible to enclose the implementation detail and reduce duplicate logic.
Differential Revision: https://reviews.llvm.org/D80402
show more ...
|
| #
838d1220 |
| 25-May-2020 |
Orivej Desh <[email protected]> |
[TargetLoweringObjectFileImpl] Use llvm::transform
Fixes a build issue with libc++ configured with _LIBCPP_RAW_ITERATORS (ADL not effective)
``` llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:16
[TargetLoweringObjectFileImpl] Use llvm::transform
Fixes a build issue with libc++ configured with _LIBCPP_RAW_ITERATORS (ADL not effective)
``` llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1602:3: error: no matching function for call to 'transform' transform(HexString.begin(), HexString.end(), HexString.begin(), tolower); ^~~~~~~~~ ```
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D80475
show more ...
|
| #
f96a7706 |
| 21-May-2020 |
Craig Topper <[email protected]> |
[Target] Use Align in TargetLoweringObjectFile::getSectionForConstant.
Differential Revision: https://reviews.llvm.org/D80363
|
| #
66055230 |
| 07-May-2020 |
Fangrui Song <[email protected]> |
[TargetLoweringObjectFileImpl] Produce .text.hot. instead of .text.hot for -fno-unique-section-names
GNU ld's internal linker script uses (https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a
[TargetLoweringObjectFileImpl] Produce .text.hot. instead of .text.hot for -fno-unique-section-names
GNU ld's internal linker script uses (https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=add44f8d5c5c05e08b11e033127a744d61c26aee)
.text : { *(.text.unlikely .text.*_unlikely .text.unlikely.*) *(.text.exit .text.exit.*) *(.text.startup .text.startup.*) *(.text.hot .text.hot.*) *(SORT(.text.sorted.*)) *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf.em. */ *(.gnu.warning) }
Because `*(.text.exit .text.exit.*)` is ordered before `*(.text .text.*)`, in a -ffunction-sections build, the C library function `exit` will be placed before other functions. gold's `-z keep-text-section-prefix` has the same problem.
In lld, `-z keep-text-section-prefix` recognizes `.text.{exit,hot,startup,unlikely,unknown}.*`, but not `.text.{exit,hot,startup,unlikely,unknown}`, to avoid the strange placement problem.
In -fno-function-sections or -fno-unique-section-names mode, a function whose `function_section_prefix` is set to `.exit"` will go to the output section `.text` instead of `.text.exit` when linked by lld. To address the problem, append a dot to become `.text.exit.`
Reviewed By: grimar
Differential Revision: https://reviews.llvm.org/D79600
show more ...
|
| #
a2c8cd18 |
| 30-Apr-2020 |
diggerlin <[email protected]> |
[AIX] emit .extern and .weak directive linkage
SUMMARY:
emit .extern and .weak directive linkage
Reviewers: hubert.reinterpretcast, Jason Liu Subscribers: wuzish, nemanjai, hiraditya
Differential
[AIX] emit .extern and .weak directive linkage
SUMMARY:
emit .extern and .weak directive linkage
Reviewers: hubert.reinterpretcast, Jason Liu Subscribers: wuzish, nemanjai, hiraditya
Differential Revision: https://reviews.llvm.org/D76932
show more ...
|
| #
0cc063a8 |
| 24-Apr-2020 |
Snehasish Kumar <[email protected]> |
Use .text.unlikely and .text.eh prefixes for MachineBasicBlock sections.
Summary: Instead of adding a ".unlikely" or ".eh" suffix for machine basic blocks, this change updates the behaviour to use a
Use .text.unlikely and .text.eh prefixes for MachineBasicBlock sections.
Summary: Instead of adding a ".unlikely" or ".eh" suffix for machine basic blocks, this change updates the behaviour to use an appropriate prefix instead. This allows lld to group basic block sections together when -z,keep-text-section-prefix is specified and matches the behaviour observed in gcc.
Reviewers: tmsriram, mtrofin, efriedma
Reviewed By: tmsriram, efriedma
Subscribers: eli.friedman, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78742
show more ...
|
| #
77618cc2 |
| 16-Apr-2020 |
jasonliu <[email protected]> |
[XCOFF][AIX] Fix getSymbol to return the correct qualname when necessary
Summary: AIX symbol have qualname and unqualified name. The stock getSymbol could only return unqualified name, which leads u
[XCOFF][AIX] Fix getSymbol to return the correct qualname when necessary
Summary: AIX symbol have qualname and unqualified name. The stock getSymbol could only return unqualified name, which leads us to patch many caller side(lowerConstant, getMCSymbolForTOCPseudoMO). So we should try to address this problem in the callee side(getSymbol) and clean up the caller side instead.
Note: this is a "mostly" NFC patch, with a fix for the original lowerConstant behavior.
Differential Revision: https://reviews.llvm.org/D78045
show more ...
|