Skip to content

Commit efd0368

Browse files
committed
Disable this performance opt on RISCV
See the comments on bbea642, the RISCV relocation model does something differently, and thus we need to emit linetables in a fully symbolic way.
1 parent 2bf5eb6 commit efd0368

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/MC/MCObjectStreamer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,10 @@ void MCObjectStreamer::emitDwarfAdvanceLineAddr(int64_t LineDelta,
469469
// fragment, then the address-offset is already a fixed constant and is not
470470
// relaxable. Emit the advance-line-addr data immediately to save time and
471471
// memory.
472+
// As per commit bbea64250f6548, RISCV always desires symbolic relocations.
472473
MCFragment *LastFrag = LastLabel->getFragment();
473-
if (LastFrag->getKind() == MCFragment::FT_Data &&
474+
if (!getAssembler().getContext().getTargetTriple().isRISCV() &&
475+
LastFrag->getKind() == MCFragment::FT_Data &&
474476
Label->getFragment() == LastFrag) {
475477
uint64_t AddrDelta = Label->getOffset() - LastLabel->getOffset();
476478
SmallString<16> Tmp;

0 commit comments

Comments
 (0)