Revision tags: llvmorg-21-init |
|
#
e7f02241 |
| 28-Jan-2025 |
Prabhuk <prabhukr@google.com> |
[nfc][llvm] Clean up isUEFI checks (#124845)
The check for `isOSWindows() || isUEFI()` is used in several places
across the codebase. Introducing `isOSWindowsOrUEFI()` in Triple.h
to simplify thes
[nfc][llvm] Clean up isUEFI checks (#124845)
The check for `isOSWindows() || isUEFI()` is used in several places
across the codebase. Introducing `isOSWindowsOrUEFI()` in Triple.h
to simplify these checks.
show more ...
|
Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
d73d5c8c |
| 15-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[MC] Remove unused includes (NFC) (#116317)
Identified with misc-include-cleaner.
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2 |
|
#
d4efc3e0 |
| 14-Oct-2024 |
Yuta Saito <kateinoigakukun@gmail.com> |
[Coverage][WebAssembly] Add initial support for WebAssembly/WASI (#111332)
Currently, WebAssembly/WASI target does not provide direct support for
code coverage.
This patch set fixes several issues
[Coverage][WebAssembly] Add initial support for WebAssembly/WASI (#111332)
Currently, WebAssembly/WASI target does not provide direct support for
code coverage.
This patch set fixes several issues to unlock the feature. The main
changes are:
1. Port `compiler-rt/lib/profile` to WebAssembly/WASI.
2. Adjust profile metadata sections for Wasm object file format.
- [CodeGen] Emit `__llvm_covmap` and `__llvm_covfun` as custom sections
instead of data segments.
- [lld] Align the interval space of custom sections at link time.
- [llvm-cov] Copy misaligned custom section data if the start address is
not aligned.
- [llvm-cov] Read `__llvm_prf_names` from data segments
3. [clang] Link with profile runtime libraries if requested
See each commit message for more details and rationale.
This is part of the effort to add code coverage support in Wasm target
of Swift toolchain.
show more ...
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2 |
|
#
7a80c867 |
| 31-Jul-2024 |
abhishek-kaushik22 <abhishek.kaushik@intel.com> |
[MC] Remove redundant null check, NFCI (#100928)
`getOrCreateSymbol` should never return a `nullptr`, add an assert and
remove the redundant null check in the if condition.
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
4010ddf7 |
| 22-Jul-2024 |
Fangrui Song <i@maskray.me> |
[MC,AArch64] Create mapping symbols with non-unique names
Add `createLocalSymbol` to create a local, non-temporary symbol. Different from `createRenamableSymbol`, the `Used` bit is ignored, therefor
[MC,AArch64] Create mapping symbols with non-unique names
Add `createLocalSymbol` to create a local, non-temporary symbol. Different from `createRenamableSymbol`, the `Used` bit is ignored, therefore multiple local symbols might share the same name.
Utilizing `createLocalSymbol` in AArch64 allows for efficient mapping symbol creation with non-unique names, saving .strtab space. The behavior matches GNU assembler.
Pull Request: https://github.com/llvm/llvm-project/pull/99836
show more ...
|
#
f138b33d |
| 22-Jul-2024 |
Chen Zheng <czhengsz@cn.ibm.com> |
[XCOFF] refactor the XCOFF BeginSymName handling
Fixes #96810
|
#
66518ad7 |
| 30-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] Remove addFragment. NFC
This was introduced in dcb71c06c7b059e313f22e46bc9c41343a03f1eb to help migrate away raw `operator new` and refactor the fragment representation.
This is now unneeded a
[MC] Remove addFragment. NFC
This was introduced in dcb71c06c7b059e313f22e46bc9c41343a03f1eb to help migrate away raw `operator new` and refactor the fragment representation.
This is now unneeded after `MCStreamer::CurFrag` and `MCSection::CurFragList` refactoring.
show more ...
|
#
55a1e0c0 |
| 29-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] getWasmSection: remove unused BeginSymName
This is cargo culting for Mach-O. See #96810
|
#
04c27852 |
| 25-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC,COFF] Change how we handle section symbols
13a79bbfe583e1d8cc85d241b580907260065eb8 (2017) unified `BeginSymbol` and section symbol for ELF. This patch does the same for COFF.
* In getCOFFSecti
[MC,COFF] Change how we handle section symbols
13a79bbfe583e1d8cc85d241b580907260065eb8 (2017) unified `BeginSymbol` and section symbol for ELF. This patch does the same for COFF.
* In getCOFFSection, all sections now have a `BeginSymbol` (section symbol). We do not need a dummy symbol name when `getBeginSymbol` is needed (used by AsmParser::Run and DWARF generation). * Section symbols are in the global symbol table. `call .text` will reference the section symbol instead of an undefined symbol. This matches GNU assembler. Unlike GNU, redefining the section symbol will cause a "symbol 'foo0' is already defined" error (see `section-sym-err.s`).
Pull Request: https://github.com/llvm/llvm-project/pull/96459
show more ...
|
#
21fac2d1 |
| 23-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] Ensure all new sections have a MCDataFragment
MCAssembler::layout ensures that every section has at least one fragment, which simplifies MCAsmLayout::getSectionAddressSize (see e73353c7201a3080
[MC] Ensure all new sections have a MCDataFragment
MCAssembler::layout ensures that every section has at least one fragment, which simplifies MCAsmLayout::getSectionAddressSize (see e73353c7201a3080851d99a16f5fe2c17f7697c6 from 2010). It's better to ensure the condition is satisfied at create time (COFF, GOFF, Mach-O) to simplify more fragment processing.
show more ...
|
#
95f983f8 |
| 23-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] Change Subsection parameters from const MCExpr * to uint32_t
Follow-up to 05ba5c0648ae5e80d5afce270495bf3b1eef9af4. uint32_t is preferred over const MCExpr * in the section stack uses because i
[MC] Change Subsection parameters from const MCExpr * to uint32_t
Follow-up to 05ba5c0648ae5e80d5afce270495bf3b1eef9af4. uint32_t is preferred over const MCExpr * in the section stack uses because it should only be evaluated once. Change the paramter type to match.
show more ...
|
#
8cb6e587 |
| 22-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] Allocate MCFragment with a bump allocator
#95197 and 75006466296ed4b0f845cbbec4bf77c21de43b40 eliminated all raw `new MCXXXFragment`. We can now place fragments in a bump allocator. In addition
[MC] Allocate MCFragment with a bump allocator
#95197 and 75006466296ed4b0f845cbbec4bf77c21de43b40 eliminated all raw `new MCXXXFragment`. We can now place fragments in a bump allocator. In addition, remove the dead `Kind == FragmentType(~0)` condition.
~CodeViewContext may call `StrTabFragment->destroy()` and need to be reset before `FragmentAllocator.Reset()`. Tested by llvm/test/MC/COFF/cv-compiler-info.ll using asan.
Pull Request: https://github.com/llvm/llvm-project/pull/96402
show more ...
|
#
84428daf |
| 20-Jun-2024 |
Alexis Engelke <engelke@in.tum.de> |
[MC] Fix compilation
|
#
6859685a |
| 20-Jun-2024 |
Alexis Engelke <engelke@in.tum.de> |
[CodeGen] Use temp symbol for MBBs (#95031)
Internal label names never occur in the symbol table, so when using an
object streamer, there's no point in constructing these names and then
adding the
[CodeGen] Use temp symbol for MBBs (#95031)
Internal label names never occur in the symbol table, so when using an
object streamer, there's no point in constructing these names and then
adding them to hash tables -- they are never visible in the output.
It's not possible to reuse createTempSymbol, because on BPF has a
different prefix for globals and basic blocks right now.
show more ...
|
#
c1a7c5ac |
| 20-Jun-2024 |
aengelke <engelke@in.tum.de> |
[MC] Eliminate two symbol-related hash maps (#95464)
Previously, a symbol insertion requires (at least) three hash table
operations:
- Lookup/create entry in Symbols (main symbol table)
- Looku
[MC] Eliminate two symbol-related hash maps (#95464)
Previously, a symbol insertion requires (at least) three hash table
operations:
- Lookup/create entry in Symbols (main symbol table)
- Lookup NextUniqueID to deduplicate identical temporary labels
- Add entry to UsedNames, which is also used to serve as storage for the
symbol name in the MCSymbol.
All three lookups are done with the same name, so combining these into a
single table reduces the number of lookups to one. Thus, a pointer to a
symbol table entry can be passed to createSymbol to avoid a duplicate
lookup of the same name.
The new symbol table entry value is placed in a separate header to avoid
including MCContext in MCSymbol or vice versa.
show more ...
|
#
46beeaa3 |
| 20-Jun-2024 |
aengelke <engelke@in.tum.de> |
[MC] Remove SectionKind from MCSection (#96067)
There are only three actual uses of the section kind in MCSection:
isText(), XCOFF, and WebAssembly. Store isText() in the MCSection, and
store othe
[MC] Remove SectionKind from MCSection (#96067)
There are only three actual uses of the section kind in MCSection:
isText(), XCOFF, and WebAssembly. Store isText() in the MCSection, and
store other info in the actual section variants where required.
ELF and COFF flags also encode all relevant information, so for these
two section variants, remove the SectionKind parameter entirely.
This allows to remove the string switch (which is unnecessary and
inaccurate) from createELFSectionImpl. This was introduced in
[D133456](https://reviews.llvm.org/D133456), but apparently, it was
never hit for non-writable sections anyway and the resulting kind was
never used.
show more ...
|
Revision tags: llvmorg-18.1.8 |
|
#
f808abf5 |
| 14-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] Add MCFragment allocation helpers
`allocFragment` might be changed to a placement new when the allocation strategy changes.
`allocInitialFragment` is to deduplicate the following pattern ```
[MC] Add MCFragment allocation helpers
`allocFragment` might be changed to a placement new when the allocation strategy changes.
`allocInitialFragment` is to deduplicate the following pattern ``` auto *F = new MCDataFragment(); Result->addFragment(*F); F->setParent(Result); ```
Pull Request: https://github.com/llvm/llvm-project/pull/95197
show more ...
|
#
d125e717 |
| 13-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] Remove setAllowTemporaryLabels and rename AllowTemporaryLabels
Follow-up to a91c8398f22c28618d681497e9856c3a4b8753c3.
|
#
ca91538c |
| 12-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] Move AllowTemporaryLabels setting to MCContext::MCContext
Also delete `AllowTemporaryLabels = true` from MCContext::reset: when llc supports -save-temp-labels in the next change, this assignmen
[MC] Move AllowTemporaryLabels setting to MCContext::MCContext
Also delete `AllowTemporaryLabels = true` from MCContext::reset: when llc supports -save-temp-labels in the next change, this assignment should be removed to support -compile-twice.
show more ...
|
#
05e87a58 |
| 11-Jun-2024 |
aengelke <engelke@in.tum.de> |
Reland "[MC][NFC] Make ELFUniquingMap a StringMap (#95006)" (#95030)
This avoids std::map, which is slow, and uses a StringMap. Section name,
group name, linked-to name and unique id are encoded in
Reland "[MC][NFC] Make ELFUniquingMap a StringMap (#95006)" (#95030)
This avoids std::map, which is slow, and uses a StringMap. Section name,
group name, linked-to name and unique id are encoded into the key for
fast lookup.
This gives a measurable performance boost for applications that compile
many small object files (e.g., functions in JIT compilers).
---
Now also the second case works properly. That's what happens when you do
that last refactoring without re-running all tests... sorry.
show more ...
|
#
43229977 |
| 10-Jun-2024 |
aengelke <engelke@in.tum.de> |
[MC] Don't evaluate name of unnamed symbols (#95021)
There's only one way to create unnamed symbols (createTempSymbol).
Previously, the name was evaluated unconditionally, but often
unnecessarily.
[MC] Don't evaluate name of unnamed symbols (#95021)
There's only one way to create unnamed symbols (createTempSymbol).
Previously, the name was evaluated unconditionally, but often
unnecessarily. Avoid this.
Also the parameter names in the header were wrong, fix these.
show more ...
|
#
66f91927 |
| 10-Jun-2024 |
aengelke <engelke@in.tum.de> |
Revert "[MC] Make ELFUniquingMap a StringMap" (#95023)
Reverts llvm/llvm-project#95006
Seems like there's some bug where the section name is empty in the `if
(!Section.isSingleStringRef())`. Rev
Revert "[MC] Make ELFUniquingMap a StringMap" (#95023)
Reverts llvm/llvm-project#95006
Seems like there's some bug where the section name is empty in the `if
(!Section.isSingleStringRef())`. Revert for now to get builds back to
green.
show more ...
|
#
2f9a80b7 |
| 10-Jun-2024 |
aengelke <engelke@in.tum.de> |
[MC][NFC] Make ELFUniquingMap a StringMap (#95006)
This avoid std::map, which is slow, and uses a StringMap. Section name,
group name, linked-to name and unique id are encoded into the key for
fas
[MC][NFC] Make ELFUniquingMap a StringMap (#95006)
This avoid std::map, which is slow, and uses a StringMap. Section name,
group name, linked-to name and unique id are encoded into the key for
fast lookup.
This gives a measurable performance boost (>3%) for applications that
compile many small object files (e.g., functions in JIT compilers).
show more ...
|
#
dcb71c06 |
| 08-Jun-2024 |
Fangrui Song <i@maskray.me> |
[MC] Simplify Sec.getFragmentList().insert(Sec.begin(), F). NFC
Decrease the uses of getFragmentList() to make it easier to change the fragment list representation.
|
Revision tags: llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
3b8b1022 |
| 14-May-2024 |
aengelke <engelke@in.tum.de> |
[MC] Make ELFEntrySizeMap a DenseMap (#91728)
There is no need for an ordered std::map and also no need to duplicate
the section name, which is owned by the ELFSectionKey. Therefore, use a
DenseMa
[MC] Make ELFEntrySizeMap a DenseMap (#91728)
There is no need for an ordered std::map and also no need to duplicate
the section name, which is owned by the ELFSectionKey. Therefore, use a
DenseMap instead and don't copy the string. As a further, minor
performance optimization, avoid the hash table lookup in
isELFGenericMergeableSection when the section name was just added.
This slightly improves compilation performance in our application, where
we occasionally compile many small object files.
show more ...
|