jobnoorman created this revision. jobnoorman added reviewers: chandlerc, grosbach, andreadb, MaskRay, craig.topper. Herald added subscribers: bviyer, asb, luke, Moerafaat, zero9178, bzcheeseman, pmatos, sdasgup3, wenzhicui, wrengr, ormris, foad, cota, teijeong, frasercrmck, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, kerbowa, liufengdb, aartbik, mgester, arpith-jacob, csigg, antiagainst, shauheen, rriddle, mehdi_amini, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, steven_wu, atanasyan, edward-jones, zzheng, jrtc27, gbedwell, niosHD, sabuasal, simoncook, johnrusso, rbar, fedor.sergeev, hiraditya, arichardson, sbc100, jvesely, sdardis, dylanmckay, jyknight, arsenm. Herald added a project: All. jobnoorman requested review of this revision. Herald added subscribers: llvm-commits, openmp-commits, cfe-commits, pcwang-thead, stephenneuendorffer, nicolasvasilache, aheejin. Herald added projects: clang, OpenMP, MLIR, LLVM.
SubtargetFeature.h is currently part of MC while it doesn't depend on anything in MC. Since some LLVM components might have the need to work with target features without necessarily needing MC, it might be worthwhile to move SubtargetFeature.h to a different location. This will reduce the dependencies of said components. Note that I choose TargetParser as the destination because that's where Triple lives and SubtargetFeatures feels related to that. Suggestions for alternative locations are welcome. This issues came up during a JITLink review (D149522 <https://reviews.llvm.org/D149522>). JITLink would like to avoid a dependency on MC while still needing to store target features. I'm not entirely sure who should review this patch so please add more reviewers if necessary. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D150549 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/Driver/ToolChains/AVR.cpp llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h llvm/include/llvm/MC/MCSubtargetInfo.h llvm/include/llvm/MC/SubtargetFeature.h llvm/include/llvm/Object/COFF.h llvm/include/llvm/Object/ELFObjectFile.h llvm/include/llvm/Object/GOFFObjectFile.h llvm/include/llvm/Object/MachO.h llvm/include/llvm/TargetParser/SubtargetFeature.h llvm/lib/CodeGen/CommandFlags.cpp llvm/lib/ExecutionEngine/TargetSelect.cpp llvm/lib/LTO/LTOBackend.cpp llvm/lib/LTO/LTOCodeGenerator.cpp llvm/lib/LTO/LTOModule.cpp llvm/lib/LTO/ThinLTOCodeGenerator.cpp llvm/lib/MC/CMakeLists.txt llvm/lib/MC/MCSubtargetInfo.cpp llvm/lib/MC/SubtargetFeature.cpp llvm/lib/Object/ELFObjectFile.cpp llvm/lib/Object/WasmObjectFile.cpp llvm/lib/Object/XCOFFObjectFile.cpp llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCTargetDesc.cpp llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp llvm/lib/Target/ARM/ARMTargetTransformInfo.h llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp llvm/lib/Target/ARM/Utils/ARMBaseInfo.h llvm/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.h llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.h llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp llvm/lib/Target/TargetMachineC.cpp llvm/lib/TargetParser/CMakeLists.txt llvm/lib/TargetParser/SubtargetFeature.cpp llvm/tools/llc/llc.cpp llvm/tools/llvm-jitlink/llvm-jitlink.h llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp llvm/tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp llvm/tools/opt/opt.cpp llvm/unittests/tools/llvm-mca/MCATestBase.h llvm/utils/TableGen/DecoderEmitter.cpp llvm/utils/TableGen/SubtargetEmitter.cpp mlir/lib/ExecutionEngine/ExecutionEngine.cpp openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
Index: openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp =================================================================== --- openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp +++ openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp @@ -23,7 +23,6 @@ #include "llvm/IR/LegacyPassManager.h" #include "llvm/IRReader/IRReader.h" #include "llvm/InitializePasses.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Object/IRObjectFile.h" #include "llvm/Passes/OptimizationLevel.h" @@ -36,6 +35,7 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <mutex> #include <shared_mutex> Index: mlir/lib/ExecutionEngine/ExecutionEngine.cpp =================================================================== --- mlir/lib/ExecutionEngine/ExecutionEngine.cpp +++ mlir/lib/ExecutionEngine/ExecutionEngine.cpp @@ -25,12 +25,12 @@ #include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h" #include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h" #include "llvm/IR/IRBuilder.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Error.h" #include "llvm/Support/ToolOutputFile.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" #define DEBUG_TYPE "execution-engine" Index: llvm/utils/TableGen/SubtargetEmitter.cpp =================================================================== --- llvm/utils/TableGen/SubtargetEmitter.cpp +++ llvm/utils/TableGen/SubtargetEmitter.cpp @@ -20,13 +20,13 @@ #include "llvm/ADT/StringRef.h" #include "llvm/MC/MCInstrItineraries.h" #include "llvm/MC/MCSchedule.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" #include "llvm/TableGen/Error.h" #include "llvm/TableGen/Record.h" #include "llvm/TableGen/TableGenBackend.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <algorithm> #include <cassert> #include <cstdint> Index: llvm/utils/TableGen/DecoderEmitter.cpp =================================================================== --- llvm/utils/TableGen/DecoderEmitter.cpp +++ llvm/utils/TableGen/DecoderEmitter.cpp @@ -2417,11 +2417,11 @@ formatted_raw_ostream OS(o); OS << "#include \"llvm/MC/MCInst.h\"\n"; OS << "#include \"llvm/MC/MCSubtargetInfo.h\"\n"; - OS << "#include \"llvm/MC/SubtargetFeature.h\"\n"; OS << "#include \"llvm/Support/DataTypes.h\"\n"; OS << "#include \"llvm/Support/Debug.h\"\n"; OS << "#include \"llvm/Support/LEB128.h\"\n"; OS << "#include \"llvm/Support/raw_ostream.h\"\n"; + OS << "#include \"llvm/TargetParser/SubtargetFeature.h\"\n"; OS << "#include <assert.h>\n"; OS << '\n'; OS << "namespace llvm {\n\n"; Index: llvm/unittests/tools/llvm-mca/MCATestBase.h =================================================================== --- llvm/unittests/tools/llvm-mca/MCATestBase.h +++ llvm/unittests/tools/llvm-mca/MCATestBase.h @@ -22,9 +22,9 @@ #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/MCTargetOptions.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/MCA/Context.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include "gtest/gtest.h" Index: llvm/tools/opt/opt.cpp =================================================================== --- llvm/tools/opt/opt.cpp +++ llvm/tools/opt/opt.cpp @@ -35,7 +35,6 @@ #include "llvm/InitializePasses.h" #include "llvm/LinkAllIR.h" #include "llvm/LinkAllPasses.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Passes/PassPlugin.h" #include "llvm/Remarks/HotnessThresholdParser.h" @@ -50,6 +49,7 @@ #include "llvm/Support/YAMLTraits.h" #include "llvm/Target/TargetMachine.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include "llvm/Transforms/IPO/WholeProgramDevirt.h" #include "llvm/Transforms/Utils/Cloning.h" Index: llvm/tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp =================================================================== --- llvm/tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp +++ llvm/tools/llvm-mc-disassemble-fuzzer/llvm-mc-disassemble-fuzzer.cpp @@ -10,10 +10,10 @@ #include "llvm-c/Disassembler.h" #include "llvm-c/Target.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" using namespace llvm; Index: llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp =================================================================== --- llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp +++ llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp @@ -24,7 +24,6 @@ #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/MCTargetOptionsCommandFlags.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/FileUtilities.h" @@ -34,6 +33,7 @@ #include "llvm/Support/ToolOutputFile.h" #include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" using namespace llvm; Index: llvm/tools/llvm-jitlink/llvm-jitlink.h =================================================================== --- llvm/tools/llvm-jitlink/llvm-jitlink.h +++ llvm/tools/llvm-jitlink/llvm-jitlink.h @@ -19,10 +19,10 @@ #include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h" #include "llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h" #include "llvm/ExecutionEngine/RuntimeDyldChecker.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/Error.h" #include "llvm/Support/Regex.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <vector> Index: llvm/tools/llc/llc.cpp =================================================================== --- llvm/tools/llc/llc.cpp +++ llvm/tools/llc/llc.cpp @@ -35,7 +35,6 @@ #include "llvm/IRReader/IRReader.h" #include "llvm/InitializePasses.h" #include "llvm/MC/MCTargetOptionsCommandFlags.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Pass.h" #include "llvm/Remarks/HotnessThresholdParser.h" @@ -53,6 +52,7 @@ #include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Target/TargetMachine.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include "llvm/Transforms/Utils/Cloning.h" #include <memory> Index: llvm/lib/TargetParser/SubtargetFeature.cpp =================================================================== --- llvm/lib/TargetParser/SubtargetFeature.cpp +++ llvm/lib/TargetParser/SubtargetFeature.cpp @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/MC/SubtargetFeature.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringRef.h" Index: llvm/lib/TargetParser/CMakeLists.txt =================================================================== --- llvm/lib/TargetParser/CMakeLists.txt +++ llvm/lib/TargetParser/CMakeLists.txt @@ -16,6 +16,7 @@ Host.cpp LoongArchTargetParser.cpp RISCVTargetParser.cpp + SubtargetFeature.cpp TargetParser.cpp Triple.cpp X86TargetParser.cpp Index: llvm/lib/Target/TargetMachineC.cpp =================================================================== --- llvm/lib/Target/TargetMachineC.cpp +++ llvm/lib/Target/TargetMachineC.cpp @@ -16,13 +16,13 @@ #include "llvm/IR/DataLayout.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Module.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/CodeGenCWrappers.h" #include "llvm/Target/TargetMachine.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cstring> #include <optional> Index: llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp =================================================================== --- llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp +++ llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp @@ -26,12 +26,12 @@ #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/MCSymbol.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Endian.h" #include "llvm/Support/EndianStream.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cassert> #include <cstdint> Index: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.h =================================================================== --- llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.h +++ llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.h @@ -10,7 +10,7 @@ #define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_MATINT_H #include "llvm/ADT/SmallVector.h" -#include "llvm/MC/SubtargetFeature.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cstdint> namespace llvm { Index: llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h =================================================================== --- llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h +++ llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h @@ -19,8 +19,8 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/MC/MCInstrDesc.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/RISCVISAInfo.h" +#include "llvm/TargetParser/SubtargetFeature.h" namespace llvm { Index: llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp =================================================================== --- llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -38,7 +38,6 @@ #include "llvm/MC/MCSymbol.h" #include "llvm/MC/MCSymbolELF.h" #include "llvm/MC/MCValue.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Support/Alignment.h" #include "llvm/Support/Casting.h" @@ -50,6 +49,7 @@ #include "llvm/Support/SMLoc.h" #include "llvm/Support/SourceMgr.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <algorithm> #include <cassert> Index: llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.h =================================================================== --- llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.h +++ llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.h @@ -18,7 +18,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/MC/MCInstrDesc.h" -#include "llvm/MC/SubtargetFeature.h" +#include "llvm/TargetParser/SubtargetFeature.h" namespace llvm { Index: llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h =================================================================== --- llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h +++ llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h @@ -17,7 +17,7 @@ #include "MCTargetDesc/HexagonFixupKinds.h" #include "llvm/MC/MCCodeEmitter.h" #include "llvm/MC/MCExpr.h" -#include "llvm/MC/SubtargetFeature.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cstddef> #include <cstdint> #include <memory> Index: llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp =================================================================== --- llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp +++ llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp @@ -18,9 +18,9 @@ #include "llvm/MC/MCDecoderOps.h" #include "llvm/MC/MCDisassembler/MCDisassembler.h" #include "llvm/MC/MCInst.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Support/MathExtras.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cstdint> using namespace llvm; Index: llvm/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp =================================================================== --- llvm/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp +++ llvm/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp @@ -3,8 +3,8 @@ #include "llvm/BinaryFormat/ELF.h" #include "llvm/MC/MCAssembler.h" #include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/FormattedStream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "AVRMCTargetDesc.h" Index: llvm/lib/Target/ARM/Utils/ARMBaseInfo.h =================================================================== --- llvm/lib/Target/ARM/Utils/ARMBaseInfo.h +++ llvm/lib/Target/ARM/Utils/ARMBaseInfo.h @@ -18,7 +18,7 @@ #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/ErrorHandling.h" -#include "llvm/MC/SubtargetFeature.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "MCTargetDesc/ARMMCTargetDesc.h" namespace llvm { Index: llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp =================================================================== --- llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp +++ llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.cpp @@ -21,11 +21,11 @@ #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/Casting.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <algorithm> #include <cassert> #include <cstdint> Index: llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp =================================================================== --- llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -19,12 +19,12 @@ #include "llvm/MC/MCInstrDesc.h" #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <algorithm> #include <cassert> #include <cstdint> Index: llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp =================================================================== --- llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -41,7 +41,6 @@ #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/MCSymbol.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Support/ARMBuildAttributes.h" #include "llvm/Support/ARMEHABI.h" @@ -52,6 +51,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Support/SMLoc.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/TargetParser.h" #include "llvm/TargetParser/Triple.h" #include <algorithm> Index: llvm/lib/Target/ARM/ARMTargetTransformInfo.h =================================================================== --- llvm/lib/Target/ARM/ARMTargetTransformInfo.h +++ llvm/lib/Target/ARM/ARMTargetTransformInfo.h @@ -25,7 +25,7 @@ #include "llvm/CodeGen/BasicTTIImpl.h" #include "llvm/IR/Constant.h" #include "llvm/IR/Function.h" -#include "llvm/MC/SubtargetFeature.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <optional> namespace llvm { Index: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp =================================================================== --- llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp +++ llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp @@ -26,10 +26,10 @@ #include "llvm/IR/IntrinsicsARM.h" #include "llvm/IR/PatternMatch.h" #include "llvm/IR/Type.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/Casting.h" #include "llvm/Support/KnownBits.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/Transforms/InstCombine/InstCombiner.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Transforms/Utils/LoopUtils.h" Index: llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp =================================================================== --- llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp +++ llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp @@ -24,8 +24,8 @@ #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/Casting.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <optional> using namespace llvm; Index: llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCTargetDesc.cpp =================================================================== --- llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCTargetDesc.cpp +++ llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCTargetDesc.cpp @@ -13,7 +13,7 @@ #include "R600MCTargetDesc.h" #include "llvm/MC/MCInstrInfo.h" -#include "llvm/MC/SubtargetFeature.h" +#include "llvm/TargetParser/SubtargetFeature.h" using namespace llvm; Index: llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp =================================================================== --- llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp +++ llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp @@ -21,8 +21,8 @@ #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/EndianStream.h" +#include "llvm/TargetParser/SubtargetFeature.h" using namespace llvm; Index: llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h =================================================================== --- llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h +++ llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h @@ -21,8 +21,8 @@ #include "MCTargetDesc/AArch64MCTargetDesc.h" // For AArch64::X0 and friends. #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringSwitch.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/TargetParser/SubtargetFeature.h" namespace llvm { Index: llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp =================================================================== --- llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -41,7 +41,6 @@ #include "llvm/MC/MCSymbol.h" #include "llvm/MC/MCTargetOptions.h" #include "llvm/MC/MCValue.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Compiler.h" @@ -50,6 +49,7 @@ #include "llvm/Support/SMLoc.h" #include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/AArch64TargetParser.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cassert> #include <cctype> #include <cstdint> Index: llvm/lib/Object/XCOFFObjectFile.cpp =================================================================== --- llvm/lib/Object/XCOFFObjectFile.cpp +++ llvm/lib/Object/XCOFFObjectFile.cpp @@ -12,8 +12,8 @@ #include "llvm/Object/XCOFFObjectFile.h" #include "llvm/ADT/StringSwitch.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/DataExtractor.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cstddef> #include <cstring> Index: llvm/lib/Object/WasmObjectFile.cpp =================================================================== --- llvm/lib/Object/WasmObjectFile.cpp +++ llvm/lib/Object/WasmObjectFile.cpp @@ -13,7 +13,6 @@ #include "llvm/ADT/StringSet.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/BinaryFormat/Wasm.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Object/Binary.h" #include "llvm/Object/Error.h" #include "llvm/Object/ObjectFile.h" @@ -24,6 +23,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/LEB128.h" #include "llvm/Support/ScopedPrinter.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <algorithm> #include <cassert> Index: llvm/lib/Object/ELFObjectFile.cpp =================================================================== --- llvm/lib/Object/ELFObjectFile.cpp +++ llvm/lib/Object/ELFObjectFile.cpp @@ -13,7 +13,6 @@ #include "llvm/Object/ELFObjectFile.h" #include "llvm/BinaryFormat/ELF.h" #include "llvm/MC/MCInstrAnalysis.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Object/ELF.h" #include "llvm/Object/ELFTypes.h" @@ -25,6 +24,7 @@ #include "llvm/Support/RISCVAttributeParser.h" #include "llvm/Support/RISCVAttributes.h" #include "llvm/Support/RISCVISAInfo.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <algorithm> #include <cstddef> Index: llvm/lib/MC/MCSubtargetInfo.cpp =================================================================== --- llvm/lib/MC/MCSubtargetInfo.cpp +++ llvm/lib/MC/MCSubtargetInfo.cpp @@ -11,9 +11,9 @@ #include "llvm/ADT/StringRef.h" #include "llvm/MC/MCInstrItineraries.h" #include "llvm/MC/MCSchedule.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/Format.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <algorithm> #include <cassert> #include <cstring> Index: llvm/lib/MC/CMakeLists.txt =================================================================== --- llvm/lib/MC/CMakeLists.txt +++ llvm/lib/MC/CMakeLists.txt @@ -65,7 +65,6 @@ MachObjectWriter.cpp SPIRVObjectWriter.cpp StringTableBuilder.cpp - SubtargetFeature.cpp TargetRegistry.cpp WasmObjectWriter.cpp WinCOFFObjectWriter.cpp Index: llvm/lib/LTO/ThinLTOCodeGenerator.cpp =================================================================== --- llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -36,7 +36,6 @@ #include "llvm/IRReader/IRReader.h" #include "llvm/LTO/LTO.h" #include "llvm/LTO/SummaryBasedOptimizations.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Object/IRObjectFile.h" #include "llvm/Passes/PassBuilder.h" @@ -53,6 +52,7 @@ #include "llvm/Support/Threading.h" #include "llvm/Support/ToolOutputFile.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/Transforms/IPO/FunctionAttrs.h" #include "llvm/Transforms/IPO/FunctionImport.h" #include "llvm/Transforms/IPO/Internalize.h" Index: llvm/lib/LTO/LTOModule.cpp =================================================================== --- llvm/lib/LTO/LTOModule.cpp +++ llvm/lib/LTO/LTOModule.cpp @@ -25,7 +25,6 @@ #include "llvm/MC/MCSection.h" #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/MC/MCSymbol.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Object/IRObjectFile.h" #include "llvm/Object/MachO.h" @@ -37,6 +36,7 @@ #include "llvm/Support/TargetSelect.h" #include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include "llvm/Transforms/Utils/GlobalStatus.h" #include <system_error> Index: llvm/lib/LTO/LTOCodeGenerator.cpp =================================================================== --- llvm/lib/LTO/LTOCodeGenerator.cpp +++ llvm/lib/LTO/LTOCodeGenerator.cpp @@ -43,7 +43,6 @@ #include "llvm/Linker/Linker.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Remarks/HotnessThresholdParser.h" #include "llvm/Support/CommandLine.h" @@ -57,6 +56,7 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetOptions.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/Internalize.h" #include "llvm/Transforms/IPO/WholeProgramDevirt.h" Index: llvm/lib/LTO/LTOBackend.cpp =================================================================== --- llvm/lib/LTO/LTOBackend.cpp +++ llvm/lib/LTO/LTOBackend.cpp @@ -25,7 +25,6 @@ #include "llvm/IR/PassManager.h" #include "llvm/IR/Verifier.h" #include "llvm/LTO/LTO.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Object/ModuleSymbolTable.h" #include "llvm/Passes/PassBuilder.h" @@ -41,6 +40,7 @@ #include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/Transforms/IPO/WholeProgramDevirt.h" #include "llvm/Transforms/Scalar/LoopPassManager.h" #include "llvm/Transforms/Utils/FunctionImportUtils.h" Index: llvm/lib/ExecutionEngine/TargetSelect.cpp =================================================================== --- llvm/lib/ExecutionEngine/TargetSelect.cpp +++ llvm/lib/ExecutionEngine/TargetSelect.cpp @@ -15,10 +15,10 @@ #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/IR/Module.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Target/TargetMachine.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" using namespace llvm; Index: llvm/lib/CodeGen/CommandFlags.cpp =================================================================== --- llvm/lib/CodeGen/CommandFlags.cpp +++ llvm/lib/CodeGen/CommandFlags.cpp @@ -18,10 +18,10 @@ #include "llvm/IR/Intrinsics.h" #include "llvm/IR/Module.h" #include "llvm/MC/MCTargetOptionsCommandFlags.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/TargetParser/Host.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <optional> Index: llvm/include/llvm/TargetParser/SubtargetFeature.h =================================================================== --- llvm/include/llvm/TargetParser/SubtargetFeature.h +++ llvm/include/llvm/TargetParser/SubtargetFeature.h @@ -1,4 +1,4 @@ -//===- llvm/MC/SubtargetFeature.h - CPU characteristics ---------*- C++ -*-===// +//=== llvm/TargetParser/SubtargetFeature.h - CPU characteristics-*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -14,8 +14,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_MC_SUBTARGETFEATURE_H -#define LLVM_MC_SUBTARGETFEATURE_H +#ifndef LLVM_TARGETPARSER_SUBTARGETFEATURE_H +#define LLVM_TARGETPARSER_SUBTARGETFEATURE_H #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/STLExtras.h" @@ -233,4 +233,4 @@ } // end namespace llvm -#endif // LLVM_MC_SUBTARGETFEATURE_H +#endif // LLVM_TARGETPARSER_SUBTARGETFEATURE_H Index: llvm/include/llvm/Object/MachO.h =================================================================== --- llvm/include/llvm/Object/MachO.h +++ llvm/include/llvm/Object/MachO.h @@ -22,7 +22,6 @@ #include "llvm/ADT/iterator_range.h" #include "llvm/BinaryFormat/MachO.h" #include "llvm/BinaryFormat/Swift.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Object/Binary.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Object/SymbolicFile.h" @@ -30,6 +29,7 @@ #include "llvm/Support/Format.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <cstdint> #include <memory> Index: llvm/include/llvm/Object/GOFFObjectFile.h =================================================================== --- llvm/include/llvm/Object/GOFFObjectFile.h +++ llvm/include/llvm/Object/GOFFObjectFile.h @@ -17,12 +17,12 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IndexedMap.h" #include "llvm/BinaryFormat/GOFF.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Support/ConvertEBCDIC.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Endian.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" namespace llvm { Index: llvm/include/llvm/Object/ELFObjectFile.h =================================================================== --- llvm/include/llvm/Object/ELFObjectFile.h +++ llvm/include/llvm/Object/ELFObjectFile.h @@ -18,7 +18,6 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/iterator_range.h" #include "llvm/BinaryFormat/ELF.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Object/Binary.h" #include "llvm/Object/ELF.h" #include "llvm/Object/ELFTypes.h" @@ -33,6 +32,7 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MemoryBufferRef.h" #include "llvm/Support/ScopedPrinter.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <cassert> #include <cstdint> Index: llvm/include/llvm/Object/COFF.h =================================================================== --- llvm/include/llvm/Object/COFF.h +++ llvm/include/llvm/Object/COFF.h @@ -15,7 +15,6 @@ #include "llvm/ADT/iterator_range.h" #include "llvm/BinaryFormat/COFF.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Object/Binary.h" #include "llvm/Object/CVDebugRecord.h" #include "llvm/Object/Error.h" @@ -24,6 +23,7 @@ #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/Endian.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cassert> #include <cstddef> #include <cstdint> Index: llvm/include/llvm/MC/MCSubtargetInfo.h =================================================================== --- llvm/include/llvm/MC/MCSubtargetInfo.h +++ llvm/include/llvm/MC/MCSubtargetInfo.h @@ -18,7 +18,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/MC/MCInstrItineraries.h" #include "llvm/MC/MCSchedule.h" -#include "llvm/MC/SubtargetFeature.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <cassert> #include <cstdint> Index: llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h =================================================================== --- llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h +++ llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h @@ -14,8 +14,8 @@ #include "llvm/MC/MCParser/MCAsmParserExtension.h" #include "llvm/MC/MCParser/MCParsedAsmOperand.h" #include "llvm/MC/MCTargetOptions.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/SMLoc.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include <cstdint> #include <memory> Index: llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h =================================================================== --- llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h +++ llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h @@ -13,11 +13,11 @@ #ifndef LLVM_EXECUTIONENGINE_ORC_JITTARGETMACHINEBUILDER_H #define LLVM_EXECUTIONENGINE_ORC_JITTARGETMACHINEBUILDER_H -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/CodeGen.h" #include "llvm/Support/Error.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include <memory> #include <optional> Index: clang/lib/Driver/ToolChains/AVR.cpp =================================================================== --- clang/lib/Driver/ToolChains/AVR.cpp +++ clang/lib/Driver/ToolChains/AVR.cpp @@ -14,10 +14,10 @@ #include "clang/Driver/Options.h" #include "llvm/ADT/StringExtras.h" #include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/Option/ArgList.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" +#include "llvm/TargetParser/SubtargetFeature.h" using namespace clang::driver; using namespace clang::driver::toolchains; Index: clang/lib/CodeGen/BackendUtil.cpp =================================================================== --- clang/lib/CodeGen/BackendUtil.cpp +++ clang/lib/CodeGen/BackendUtil.cpp @@ -37,7 +37,6 @@ #include "llvm/IRPrinter/IRPrintingPasses.h" #include "llvm/LTO/LTOBackend.h" #include "llvm/MC/MCAsmInfo.h" -#include "llvm/MC/SubtargetFeature.h" #include "llvm/MC/TargetRegistry.h" #include "llvm/Object/OffloadBinary.h" #include "llvm/Passes/PassBuilder.h" @@ -54,6 +53,7 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" +#include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" #include "llvm/Transforms/IPO/LowerTypeTests.h" #include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h"
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits