[PATCH] D13193: Add an MCTargetMachine and use it to configure MCAsmInfo

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 26 07:13:37 PDT 2015


dsanders created this revision.
dsanders added subscribers: echristo, rengolin, llvm-commits.
Herald added subscribers: jyknight, dschuff, arsenm, jfb, jholewinski.

All targets require a registered MCTargetMachine, even if it's just
MCTargetMachine itself.

A small number of MCTargetMachine subclasses (namely PPCMCTargetMachine,
and X86MCTargetMachine) store the Triple in order to compare MacOSX
versions. Ideally, this would be possible without having to store a Triple.

A corresponding patch to clang will be committed along with this. The patch
is similar to the patches in the tools in ./tools/....

Mips currently obtains the ABI from the Triple architecture. This is wrong
since the architecture is the wrong source for this information, the value
is often misleading, and selecting the N32 ABI isn't possible. However,
it preserves the existing behaviour for the moment. A follow-up patch will
address these problems.

Follow up patches will expand the MCTargetMachine to other parts of the MC
layer.

http://reviews.llvm.org/D13193

Files:
  include/llvm/MC/MCTargetMachine.h
  include/llvm/Support/TargetRegistry.h
  include/llvm/Target/TargetMachine.h
  lib/CodeGen/LLVMTargetMachine.cpp
  lib/MC/CMakeLists.txt
  lib/MC/MCDisassembler/Disassembler.cpp
  lib/MC/MCTargetMachine.cpp
  lib/Object/IRObjectFile.cpp
  lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
  lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h
  lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
  lib/Target/AArch64/MCTargetDesc/AArch64MCTargetMachine.h
  lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp
  lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.h
  lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp
  lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
  lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h
  lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
  lib/Target/ARM/MCTargetDesc/ARMMCTargetMachine.h
  lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h
  lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp
  lib/Target/BPF/MCTargetDesc/BPFMCTargetMachine.h
  lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp
  lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h
  lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
  lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
  lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h
  lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
  lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
  lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
  lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h
  lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
  lib/Target/Mips/MCTargetDesc/MipsMCTargetMachine.h
  lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
  lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h
  lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp
  lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetMachine.h
  lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
  lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h
  lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
  lib/Target/PowerPC/MCTargetDesc/PPCMCTargetMachine.h
  lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
  lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h
  lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
  lib/Target/Sparc/MCTargetDesc/SparcMCTargetMachine.h
  lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
  lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h
  lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
  lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetMachine.h
  lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
  lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h
  lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
  lib/Target/X86/MCTargetDesc/X86MCTargetMachine.h
  lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp
  lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h
  lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
  tools/dsymutil/DwarfLinker.cpp
  tools/llvm-mc/Disassembler.cpp
  tools/llvm-mc/llvm-mc.cpp
  tools/llvm-objdump/MachODump.cpp
  tools/llvm-objdump/llvm-objdump.cpp
  tools/llvm-rtdyld/llvm-rtdyld.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13193.35801.patch
Type: text/x-patch
Size: 84359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150926/ab8b18d6/attachment-0001.bin>


More information about the llvm-commits mailing list