[all-commits] [llvm/llvm-project] e87f33: [RISCV][MC] Pass MCSubtargetInfo down to shouldFor...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Dec 7 13:18:11 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e87f33d9ce785668223c3bcc4e06956985cccda1
      https://github.com/llvm/llvm-project/commit/e87f33d9ce785668223c3bcc4e06956985cccda1
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-12-07 (Thu, 07 Dec 2023)

  Changed paths:
    M llvm/include/llvm/MC/MCAsmBackend.h
    M llvm/include/llvm/MC/MCAssembler.h
    M llvm/lib/MC/MCAssembler.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
    M llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
    M llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
    M llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h
    M llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
    M llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.h
    M llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
    M llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
    M llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
    M llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
    M llvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
    M llvm/test/CodeGen/RISCV/relax-per-target-feature.ll

  Log Message:
  -----------
  [RISCV][MC] Pass MCSubtargetInfo down to shouldForceRelocation and evaluateTargetFixup. (#73721)

Instead of using the STI stored in RISCVAsmBackend, try to get it from
the MCFragment.

This addresses the issue raised here
https://discourse.llvm.org/t/possible-problem-related-to-subtarget-usage/75283




More information about the All-commits mailing list