History log of /llvm-project/llvm/lib/MC/MCELFStreamer.cpp (Results 1 – 25 of 290)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# ee99c4d4 23-Jan-2025 SivanShani-Arm <sivan.shani@arm.com>

[LLVM][Clang][AArch64] Implement AArch64 build attributes (#123990)

- Added support for AArch64-specific build attributes.
- Print AArch64 build attributes to assembly.
- Emit AArch64 build attrib

[LLVM][Clang][AArch64] Implement AArch64 build attributes (#123990)

- Added support for AArch64-specific build attributes.
- Print AArch64 build attributes to assembly.
- Emit AArch64 build attributes to ELF.

Specification: https://github.com/ARM-software/abi-aa/pull/230

show more ...


# b40739a6 22-Jan-2025 Kazu Hirata <kazu@google.com>

Revert "[LLVM][Clang][AArch64] Implement AArch64 build attributes (#118771)"

This reverts commit d7fb4a275c98f4035d1083b5eb3edd2ffb2da00e.

Buildbots failing:
https://lab.llvm.org/buildbot/#/builder

Revert "[LLVM][Clang][AArch64] Implement AArch64 build attributes (#118771)"

This reverts commit d7fb4a275c98f4035d1083b5eb3edd2ffb2da00e.

Buildbots failing:
https://lab.llvm.org/buildbot/#/builders/169/builds/7671
https://lab.llvm.org/buildbot/#/builders/65/builds/11046

show more ...


# d7fb4a27 22-Jan-2025 SivanShani-Arm <sivan.shani@arm.com>

[LLVM][Clang][AArch64] Implement AArch64 build attributes (#118771)

- Added support for AArch64-specific build attributes.
- Print AArch64 build attributes to assembly.
- Parse AArch64 build attri

[LLVM][Clang][AArch64] Implement AArch64 build attributes (#118771)

- Added support for AArch64-specific build attributes.
- Print AArch64 build attributes to assembly.
- Parse AArch64 build attributes from assembly.
- Emit AArch64 build attributes to ELF.

Specification:
https://github.com/ARM-software/abi-aa/pull/230

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, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2
# 25bea3eb 30-Jul-2024 Sergei Barannikov <barannikov88@gmail.com>

[MC] Forward declare ELFObjectWriter (#100989)


Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init
# f017d89b 23-Jul-2024 Fangrui Song <i@maskray.me>

MCAssembler: Move SubsectionsViaSymbols; to MCObjectWriter


# ae3c85a7 23-Jul-2024 Fangrui Song <i@maskray.me>

MCAssembler: Move CGProfile to MCObjectWriter


# 9e97f80c 23-Jul-2024 Fangrui Song <i@maskray.me>

MCAssembler: Move Symvers to ELFObjectWriter

Similar to c473e75adeaf2998e4fb444b0bdbf2dd19312e50


# 70c52b62 22-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Export llvm::ELFObjectWriter

Similar to commit 28fcafb50274be2520117eacb0a886adafefe59d (2011) for
MachObjectWriter and commit 9539a7796094ff5fb59d9c685140ea2e214b945c for
WinCOFFObjectWriter.

[MC] Export llvm::ELFObjectWriter

Similar to commit 28fcafb50274be2520117eacb0a886adafefe59d (2011) for
MachObjectWriter and commit 9539a7796094ff5fb59d9c685140ea2e214b945c for
WinCOFFObjectWriter.

MCELFStreamer can now access ELFObjectWriter directly without adding
ELF-specific markGnuAbi (https://reviews.llvm.org/D97976) and
setOverrideABIVersion to MCObjectWriter.

A few member variables have to be made public since we cannot use a
friend declaration for ELFWriter.

show more ...


# b96c0123 12-Jul-2024 Kazu Hirata <kazu@google.com>

[MC] Use range-based for loops (NFC) (#98604)


# f15266e9 04-Jul-2024 Alexis Engelke <engelke@in.tum.de>

[MC][ELF] Emit instructions directly into fragment (#94950)

Avoid needless copying of instructions and fixups and directly emit into
the fragment small vectors.

This (optionally, second commit)

[MC][ELF] Emit instructions directly into fragment (#94950)

Avoid needless copying of instructions and fixups and directly emit into
the fragment small vectors.

This (optionally, second commit) also removes the single use of the
MCCompactEncodedInstFragment to simplify code.

show more ...


# 626eef5e 28-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Optimize getCurrentSectionOnly using CurFrag and make it non-nullable

Follow-up to e48c4011ca80385573f1b92793c75dc98abb228f ("[MC] Cache current fragment in MCStreamer").

Prerequisite: a few c

[MC] Optimize getCurrentSectionOnly using CurFrag and make it non-nullable

Follow-up to e48c4011ca80385573f1b92793c75dc98abb228f ("[MC] Cache current fragment in MCStreamer").

Prerequisite: a few commits that removed nullable getCurrentSectionOnly calls.

show more ...


# db48f1a1 28-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Remove nullable getCurrentSectionOnly use from AsmParser

We will implement getCurrentSectionOnly with `CurFrag->getParent()`,
which is non-null. Eliminate a nullable use.


# fcffb2c0 28-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Replace one nullable getCurrentSectionOnly with CurFrag

We will implement getCurrentSectionOnly with `CurFrag->getParent()`,
which is non-null. Eliminate a nullable use.


# 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 ...


# 4684d0c0 22-Jun-2024 Fangrui Song <i@maskray.me>

[MC] emitLabelAtPos: change parameter to MCDataFragment &. NFC

emitLabelAtPos is only called by ARMELFStreamer with MCDataFragment.


Revision tags: llvmorg-18.1.8
# b1932b84 14-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Aligned bundling: remove special handling for RelaxAll

When both aligned bundling and RelaxAll are enabled, bundle padding is
directly written into fragments (https://reviews.llvm.org/D8072).
(

[MC] Aligned bundling: remove special handling for RelaxAll

When both aligned bundling and RelaxAll are enabled, bundle padding is
directly written into fragments (https://reviews.llvm.org/D8072).
(The original motivation was memory usage, which has been achieved from
different angles with recent assembler improvement).

The code presents challenges with the work to replace fragment
representation (e.g. #94950 #95077). This patch removes the special
handling. RelaxAll still works but the behavior seems slightly different
as revealed by 2 changed tests. However, most `-mc-relax-all` tests are
unchanged.

RelaxAll used to be the default for clang -O0. This mode has significant
code size drawbacks and newer Clang doesn't use it (#90013).

---

flushPendingLabels: The FOffset parameter can be removed: pending labels
will be assigned to the incoming fragment at offset 0.

Pull Request: https://github.com/llvm/llvm-project/pull/95188

show more ...


# 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 ...


Revision tags: llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5
# 4e340356 25-Apr-2024 Fangrui Song <i@maskray.me>

[MC] Remove RelaxAll parameters from create*Streamer

Related to clean-up opportunities discussed at #90013.

After these cleanups, the `RelaxAll` parameter from
`createMCObjectStreamer` can be remov

[MC] Remove RelaxAll parameters from create*Streamer

Related to clean-up opportunities discussed at #90013.

After these cleanups, the `RelaxAll` parameter from
`createMCObjectStreamer` can be removed as well. As
`createMCObjectStreamer` is a more user-facing API and used by two files
in mlir/, we postpone the cleanup to the future.

show more ...


# 45b59cb1 25-Apr-2024 Fangrui Song <i@maskray.me>

[MC] Move setRelaxAll() calls to MCObjectStreamer

Related to clean-up opportunities discussed at #90013.


Revision tags: llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 8275dc97 08-Dec-2023 Fangrui Song <i@maskray.me>

[MC] .reloc: register used symbols

When `sym` in `.reloc ., BFD_RELOC_NONE, sym` is not referenced
elsewhere, `sym` is not in the symbol table and the relocation
references the null symbol. Visit th

[MC] .reloc: register used symbols

When `sym` in `.reloc ., BFD_RELOC_NONE, sym` is not referenced
elsewhere, `sym` is not in the symbol table and the relocation
references the null symbol. Visit the expression to fix the issue.

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# e6fed063 29-Jun-2023 Fangrui Song <i@maskray.me>

[RISCV] Make linker-relaxable instructions terminate MCDataFragment

`MCExpr::evaluateAsAbsolute` has a longstanding bug. When the MCAssembler is
non-null and the MCAsmLayout is null, it may incorrec

[RISCV] Make linker-relaxable instructions terminate MCDataFragment

`MCExpr::evaluateAsAbsolute` has a longstanding bug. When the MCAssembler is
non-null and the MCAsmLayout is null, it may incorrectly fold A-B even if A and
B are separated by a linker-relaxable instruction. This behavior can suppress
some ADD/SUB relocations and lead to wrong results if the linker performs
relaxation.

To fix the bug, ensure that linker-relaxable instructions only appear at the end
of an MCDataFragment, thereby making them terminate the fragment. When computing
A-B, suppress folding if A and B are separated by a linker-relaxable
instruction.

* `.subsection` now correctly give errors for non-foldable expressions.
* gen-dwarf.s will pass even if we add back the .debug_line or .eh_frame/.debug_frame code from D150004
* This will fix suppressed relocation when we add R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128.

In the future, we should investigate the desired behavior for
`MCExpr::evaluateAsAbsolute` when both MCAssembler and MCAsmLayout are non-null.

(Note: MCRelaxableFragment is only for assembler-relaxation. If we ever need
linker-relaxable MCRelaxableFragment, we would need to adjust RISCVMCExpr.cpp
(D58943/D73211).)

Depends on D153096

Differential Revision: https://reviews.llvm.org/D153097

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2
# 7198bacc 17-Apr-2023 Eli Friedman <efriedma@quicinc.com>

[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols

This is mostly useful for ARM64EC, which uses such symbols extensively.

One interesting quirk of ARM64EC is that we need

[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols

This is mostly useful for ARM64EC, which uses such symbols extensively.

One interesting quirk of ARM64EC is that we need to be able to emit weak
symbols that point at each other (so if either symbol is defined
elsewhere, both symbols point at the definition). This handling is
currently restricted to weak_anti_dep symbols, because we depend on the
current behavior of resolving weak symbols in some cases.

Differential Revision: https://reviews.llvm.org/D145208

show more ...


# 439f804c 27-Apr-2023 Zequan Wu <zequanwu@google.com>

Revert "[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols"

This reverts commit 10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2. It causes undefined symbol error on chromium windo

Revert "[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols"

This reverts commit 10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2. It causes undefined symbol error on chromium windows build. A small repro was uploaded to the code review.

show more ...


# 10c17c97 17-Apr-2023 Eli Friedman <efriedma@quicinc.com>

[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols

This is mostly useful for ARM64EC, which uses such symbols extensively.

One interesting quirk of ARM64EC is that we need

[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols

This is mostly useful for ARM64EC, which uses such symbols extensively.

One interesting quirk of ARM64EC is that we need to be able to emit weak
symbols that point at each other (so if either symbol is defined
elsewhere, both symbols point at the definition). This required a few
changes to the way we handle weak symbols on Windows.

Differential Revision: https://reviews.llvm.org/D145208

show more ...


12345678910>>...12