[all-commits] [llvm/llvm-project] a33193: [MC] Move CompressDebugSections/RelaxELFRelocation...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Mar 6 23:20:23 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3319371970b599ef65ef1567c440fbdc3a330f4
      https://github.com/llvm/llvm-project/commit/a3319371970b599ef65ef1567c440fbdc3a330f4
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/tools/driver/cc1as_main.cpp
    M lld/test/ELF/weak-undef-got-pie.s
    M llvm/include/llvm/CodeGen/CommandFlags.h
    M llvm/include/llvm/MC/MCAsmInfo.h
    M llvm/include/llvm/MC/MCContext.h
    M llvm/include/llvm/MC/MCTargetOptions.h
    M llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h
    M llvm/include/llvm/Target/TargetOptions.h
    M llvm/lib/CodeGen/CommandFlags.cpp
    M llvm/lib/CodeGen/LLVMTargetMachine.cpp
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/MC/ELFObjectWriter.cpp
    M llvm/lib/MC/MCTargetOptionsCommandFlags.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
    M llvm/lib/Target/X86/X86MCInstLower.cpp
    M llvm/test/ExecutionEngine/JITLink/AArch64/ELF_minimal.s
    M llvm/test/ExecutionEngine/JITLink/AArch64/ELF_relocations.s
    M llvm/test/ExecutionEngine/JITLink/x86-64/COFF_small_pic_relocations.s
    M llvm/test/ExecutionEngine/JITLink/x86-64/ELF_common_var.s
    M llvm/test/MC/ELF/got-relaxed-i386.s
    M llvm/test/MC/ELF/relocation-386.s
    M llvm/test/MC/X86/gotpcrelx.s
    M llvm/tools/gold/gold-plugin.cpp
    M llvm/tools/llvm-mc/llvm-mc.cpp

  Log Message:
  -----------
  [MC] Move CompressDebugSections/RelaxELFRelocations from TargetOptions/MCAsmInfo to MCTargetOptions

The convention is for such MC-specific options to reside in
MCTargetOptions. However, CompressDebugSections/RelaxELFRelocations do
not follow the convention: `CompressDebugSections` is defined in both
TargetOptions and MCAsmInfo and there is forwarding complexity.

Move the option to MCTargetOptions and hereby simplify the code. Rename
the misleading RelaxELFRelocations to X86RelaxRelocations. llvm-mc
-relax-relocations and llc -x86-relax-relocations can now be unified.



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