History log of /llvm-project/llvm/lib/MC/MCAssembler.cpp (Results 1 – 25 of 525)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 814b34f3 20-Jan-2025 Patryk Wychowaniec <pwychowaniec@pm.me>

[AVR] Force relocations for non-encodable jumps (#121498)

This commit changes the branch emission logic so that instead of
throwing the "branch target out of range" error, we emit a relocation
ins

[AVR] Force relocations for non-encodable jumps (#121498)

This commit changes the branch emission logic so that instead of
throwing the "branch target out of range" error, we emit a relocation
instead.

show more ...


Revision tags: llvmorg-19.1.7
# c1931241 22-Dec-2024 Fangrui Song <i@maskray.me>

[MC] Remove fixup_begin/fixup_end


Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, 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
# ff2e619d 19-Aug-2024 Fangrui Song <i@maskray.me>

[MC] Remove duplicate getFixupKindInfo calls. NFC

Due to 8728e097dfbec3630a1dd907431c0f14274a1ae8
(`std::unique_ptr<MCAsmBackend> Backend`), the compiler doesn't know
that `Backend` will not be modi

[MC] Remove duplicate getFixupKindInfo calls. NFC

Due to 8728e097dfbec3630a1dd907431c0f14274a1ae8
(`std::unique_ptr<MCAsmBackend> Backend`), the compiler doesn't know
that `Backend` will not be modified across function calls.

show more ...


Revision tags: llvmorg-19.1.0-rc2
# 07d2709a 31-Jul-2024 Nikita Popov <npopov@redhat.com>

Revert "[MC] Compute fragment offsets eagerly"

This reverts commit be5a845e4c29aadb513ae6e5e2879dccf37efdbb.

This causes large code size regressions, which were not present
in the initial version o

Revert "[MC] Compute fragment offsets eagerly"

This reverts commit be5a845e4c29aadb513ae6e5e2879dccf37efdbb.

This causes large code size regressions, which were not present
in the initial version of this change.

show more ...


# be5a845e 31-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Compute fragment offsets eagerly

This builds on top of commit 9d0754ada5dbbc0c009bcc2f7824488419cc5530
("[MC] Relax fragments eagerly") and relaxes fragments eagerly to
eliminate MCSection::Has

[MC] Compute fragment offsets eagerly

This builds on top of commit 9d0754ada5dbbc0c009bcc2f7824488419cc5530
("[MC] Relax fragments eagerly") and relaxes fragments eagerly to
eliminate MCSection::HasLayout and `getFragmentOffset` overhead. The
approach is slightly different from
1a47f3f3db66589c11f8ddacfeaecc03fb80c510 and has less performance
benefit.

The new layout algorithm also addresses the following problems:

* Size change of MCFillFragment/MCOrgFragment did not influence the
fixed-point iteration, which could be problematic for contrived cases.
* The `invalid number of bytes` error was reported too early. Since
`.zero A-B` might have temporary negative values in the first few
iterations.
* X86AsmBackend::finishLayout performed only one iteration, which might
not converge. In addition, the removed `#ifndef NDEBUG` code (disabled
by default) in X86AsmBackend::finishLayout was problematic, as !NDEBUG
and NDEBUG builds evaluated fragment offsets at different times before
this patch.
* The computed layout for relax-recompute-align.s is optimal now.

Builds with many text sections (e.g. full LTO) shall observe a decrease
in compile time while the new algorithm could be slightly slower for
some -O0 -g projects.

Aligned bundling from the deprecated PNaCl placed constraints how we can
perform iteration.

show more ...


# 4eb5450f 30-Jul-2024 Fangrui Song <i@maskray.me>

Revert "[MC] Compute fragment offsets eagerly"

This reverts commit 1a47f3f3db66589c11f8ddacfeaecc03fb80c510.

Fix #100283

This commit is actually a trigger of other preexisting problems:

* Size ch

Revert "[MC] Compute fragment offsets eagerly"

This reverts commit 1a47f3f3db66589c11f8ddacfeaecc03fb80c510.

Fix #100283

This commit is actually a trigger of other preexisting problems:

* Size change of fill fragments does not influence the fixed-point iteration.
* The `invalid number of bytes` error is reported too early. Since
`.zero A-B` might have temporary negative values in the first few
iterations.

However, the problems appeared at least "benign" (did not affect the
Linux kernel builds) before this commit.

show more ...


# de5aa8d0 29-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Remove unused MCCompactEncodedInstFragment

This has been used after #94950.


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

MCAssembler: Remove unused functions


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

MCAssembler: Move SubsectionsViaSymbols; to MCObjectWriter


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

MCAssembler: Remove getWriterPtr

Commit 8728e097dfbec3630a1dd907431c0f14274a1ae8 (2018) introduced
getWriterPtr, which might be nullptr for MCAsmStreamer. This lured call
sites to use getWriterPtr w

MCAssembler: Remove getWriterPtr

Commit 8728e097dfbec3630a1dd907431c0f14274a1ae8 (2018) introduced
getWriterPtr, which might be nullptr for MCAsmStreamer. This lured call
sites to use getWriterPtr when it's guaranteed to be non-null for
MCObjectstreamer. Remove this misleading API.

show more ...


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

MCAssembler: Move LinkerOptions to MachObjectWriter


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

MCAssembler: Move FileNames and CompilerVersion to MCObjectWriter


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

MCAssmembler: Move ELFHeaderEFlags to ELFObjectWriter

Now that MCELFStreamer can access ELFObjectWriter (commit
70c52b62c5669993e341664a63bfbe5245e32884), we can move ELFHeaderEFlags
there.


# 1a47f3f3 21-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Compute fragment offsets eagerly

This builds on top of commit 9d0754ada5dbbc0c009bcc2f7824488419cc5530
("[MC] Relax fragments eagerly") and relaxes fragments eagerly to
eliminate MCSection::Has

[MC] Compute fragment offsets eagerly

This builds on top of commit 9d0754ada5dbbc0c009bcc2f7824488419cc5530
("[MC] Relax fragments eagerly") and relaxes fragments eagerly to
eliminate MCSection::HasLayout and `getFragmentOffset` overhead.

Note: The removed `#ifndef NDEBUG` code (disabled by default) in
X86AsmBackend::finishLayout was problematic, as (a) !NDEBUG and NDEBUG
builds evaluated fragment offsets at different times before this patch
(b) one iteration might not be sufficient to converge. There might be
some edge cases that it did not handle. Anyhow, this patch probably
makes it work for more cases.

show more ...


# 09a399a1 21-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move VersionInfo to MachObjectWriter


# 9539a779 21-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Export llvm::WinCOFFObjectWriter and access it from MCWinCOFFStreamer

Similar to commit 28fcafb50274be2520117eacb0a886adafefe59d (2011) for
MachObjectWriter. MCWinCOFFStreamer can now access Wi

[MC] Export llvm::WinCOFFObjectWriter and access it from MCWinCOFFStreamer

Similar to commit 28fcafb50274be2520117eacb0a886adafefe59d (2011) for
MachObjectWriter. MCWinCOFFStreamer can now access WinCOFFObjectWriter
directly without holding object file format specific inforamtion in
MCAssembler (e.g. IncrementalLinkerCompatible).

show more ...


# a2af3755 21-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move LOHContainer to MachObjectwriter


# b75453bc 05-Jul-2024 Fangrui Song <i@maskray.me>

MCAssembler: Remove unneeded non-const iterators for Sections and misleading size()

The pointers cannot be mutated even if the dereferenced MCSection can.


# 4a0aff19 05-Jul-2024 Fangrui Song <i@maskray.me>

MCAssembler: Clean up iterator types for Symbols


# 009082aa 05-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move MCAssembler::DataRegions to MachObjectWriter

and make some cleanup.


# 1d4d92d1 05-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move MCAssembler::IndirectSymbols to MachObjectWriter


# 94471e73 04-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move MCAssembler::isSymbolLinkerVisible to MCSymbolMachO


# 35668e2c 02-Jul-2024 Fangrui Song <i@maskray.me>

Remove llvm/MC/MCAsmLayout.h and the unused parameter in MCAssembler::layout

This restores 63ec52f867ada8d841dd872acf3d0cb62e2a99e8 and
46f7929879a59ec72dc75679b4201e2d314efba9, NFC changes that wer

Remove llvm/MC/MCAsmLayout.h and the unused parameter in MCAssembler::layout

This restores 63ec52f867ada8d841dd872acf3d0cb62e2a99e8 and
46f7929879a59ec72dc75679b4201e2d314efba9, NFC changes that were
unnecessarily reverted.

This completes the work that merges MCAsmLayout into MCAssembler.

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

show more ...


# e94a00c3 02-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Use a stub ctor for MCAsmLayout

and replace MCAssembler::Layout with a bool.
This mostly completes "[MC] Start merging MCAsmLayout into MCAssembler".

Note: BOLT used a dummy `MCAsmLayout` to c

[MC] Use a stub ctor for MCAsmLayout

and replace MCAssembler::Layout with a bool.
This mostly completes "[MC] Start merging MCAsmLayout into MCAssembler".

Note: BOLT used a dummy `MCAsmLayout` to call `getSymbolOffset`, which
is technically not supported. There is some discussion in
https://reviews.llvm.org/D154604 .

The revert f80a4072ced41b52363c63df28fea9a649f7f89e is incorrect and
actually broke bots.

show more ...


# f80a4072 02-Jul-2024 Davide Italiano <davidino@fb.com>

Revert "[MC] Use a stub ctor for MCAsmLayout"

This reverts commit bbb50369a149d9a7d1f91efaaabf75c260a220c7.

This breaks BOLT.


12345678910>>...21