[PATCH] D107314: [MC][CodeGen] Emit constant pools earlier

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 2 15:39:01 PDT 2021


aeubanks created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Previously we would emit constant pool entries for ldr inline asm at the
very end of AsmPrinter::doFinalization(). However, if we're emitting
dwarf aranges, that would end all sections with aranges. Then if we have
constant pool entries to be emitted in those same sections, we'd hit an
assert that the section has already been ended.

We want to emit constant pool entries before emitting dwarf aranges.
This patch splits out arm32/64's constant pool entry emission into its
own MCTargetStreamer virtual method.

Fixes PR51208


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107314

Files:
  llvm/include/llvm/MC/MCStreamer.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/lib/MC/MCParser/AsmParser.cpp
  llvm/lib/MC/MCStreamer.cpp
  llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp
  llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.h
  llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
  llvm/test/MC/ARM/arange-ldr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107314.363591.patch
Type: text/x-patch
Size: 5130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210802/b2d2503f/attachment.bin>


More information about the llvm-commits mailing list