[all-commits] [llvm/llvm-project] ad2534: [MC][CodeGen] Emit constant pools earlier

aeubanks via All-commits all-commits at lists.llvm.org
Tue Aug 3 20:56:16 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad253446208a06902d3bc4939ac7a64f8026cc84
      https://github.com/llvm/llvm-project/commit/ad253446208a06902d3bc4939ac7a64f8026cc84
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2021-08-03 (Tue, 03 Aug 2021)

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

  Log Message:
  -----------
  [MC][CodeGen] Emit constant pools earlier

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

Reviewed By: MaskRay

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




More information about the All-commits mailing list