[all-commits] [llvm/llvm-project] 73e4b5: MC: Simplify fragment reuse determination
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Jul 18 09:51:42 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 73e4b589ba9526c72f495ca6898ed18d730d2db4
https://github.com/llvm/llvm-project/commit/73e4b589ba9526c72f495ca6898ed18d730d2db4
Author: Fangrui Song <i at maskray.me>
Date: 2025-07-18 (Fri, 18 Jul 2025)
Changed paths:
M llvm/include/llvm/MC/MCObjectStreamer.h
M llvm/include/llvm/MC/MCSection.h
M llvm/include/llvm/MC/MCStreamer.h
M llvm/lib/MC/MCObjectStreamer.cpp
M llvm/lib/MC/MCParser/MCTargetAsmParser.cpp
M llvm/lib/MC/MCStreamer.cpp
M llvm/test/MC/RISCV/Relocations/mc-dump.s
Log Message:
-----------
MC: Simplify fragment reuse determination
First, avoid checking MCSubtargetInfo by reducing unnecessary overhead
introduced in https://reviews.llvm.org/D44928 . That change passed STI
to both FT_Data and FT_Relaxable fragments, but STI is only necessary
for FT_Relaxable.
The use of STI in FT_Data was added for:
* Bundle alignment mode, which has been removed (#148781).
* ARM, which inappropriately uses STI in `ARMAsmBackend::applyFixup` due
to tech debt, unlike other targets. All tests passed even without the
`copySTI` change.
To ensure safety, `copySTI` now starts a new fragment to prevent mixed
STI values.
Second, avoid checking LinkerRelaxable by eagerly starting a new
fragment when a FT_Data/FT_Align fragment is marked linker-relaxable.
There is currently an extra empty FT_Data if an alignment immediately
follows a linker-relaxable fragment, which will be improved in the
future when FT_Align information is moved to the variable-tail.
Pull Request: https://github.com/llvm/llvm-project/pull/149471
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list