forked from OSchip/llvm-project
[RISCV] Merge Utils library into MCTargetDesc
MCTargetDesc includes headers from Utils and Utils includes headers from MCTargetDesc. So from a library layering perspective it makes sense for them to be in the same library. I guess the other option might be to move the tablegen includes from RISCVMCTargetDesc.h to RISCVBaseInfo.h so that RISCVBaseInfo.h didn't need to include RISCVMCTargetDesc.h. Everything else that depends on Utils also depends on MCTargetDesc so having one library seemed simpler. Differential Revision: https://reviews.llvm.org/D93168
This commit is contained in:
parent
e3b9af92a4
commit
387d3c2479
|
@ -6,7 +6,6 @@ add_llvm_component_library(LLVMRISCVAsmParser
|
|||
MCParser
|
||||
RISCVDesc
|
||||
RISCVInfo
|
||||
RISCVUtils
|
||||
Support
|
||||
|
||||
ADD_TO_COMPONENT
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "MCTargetDesc/RISCVAsmBackend.h"
|
||||
#include "MCTargetDesc/RISCVBaseInfo.h"
|
||||
#include "MCTargetDesc/RISCVInstPrinter.h"
|
||||
#include "MCTargetDesc/RISCVMCExpr.h"
|
||||
#include "MCTargetDesc/RISCVMCTargetDesc.h"
|
||||
#include "MCTargetDesc/RISCVMatInt.h"
|
||||
#include "MCTargetDesc/RISCVTargetStreamer.h"
|
||||
#include "TargetInfo/RISCVTargetInfo.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "Utils/RISCVMatInt.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SmallBitVector.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
|
|
|
@ -47,7 +47,6 @@ add_llvm_target(RISCVCodeGen
|
|||
MC
|
||||
RISCVDesc
|
||||
RISCVInfo
|
||||
RISCVUtils
|
||||
SelectionDAG
|
||||
Support
|
||||
Target
|
||||
|
@ -61,4 +60,3 @@ add_subdirectory(AsmParser)
|
|||
add_subdirectory(Disassembler)
|
||||
add_subdirectory(MCTargetDesc)
|
||||
add_subdirectory(TargetInfo)
|
||||
add_subdirectory(Utils)
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "MCTargetDesc/RISCVBaseInfo.h"
|
||||
#include "MCTargetDesc/RISCVMCTargetDesc.h"
|
||||
#include "TargetInfo/RISCVTargetInfo.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
|
||||
#include "llvm/MC/MCFixedLenDisassembler.h"
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
add_llvm_component_library(LLVMRISCVDesc
|
||||
RISCVAsmBackend.cpp
|
||||
RISCVBaseInfo.cpp
|
||||
RISCVELFObjectWriter.cpp
|
||||
RISCVInstPrinter.cpp
|
||||
RISCVMCAsmInfo.cpp
|
||||
RISCVMCCodeEmitter.cpp
|
||||
RISCVMCExpr.cpp
|
||||
RISCVMCTargetDesc.cpp
|
||||
RISCVMatInt.cpp
|
||||
RISCVTargetStreamer.cpp
|
||||
RISCVELFStreamer.cpp
|
||||
|
||||
LINK_COMPONENTS
|
||||
MC
|
||||
RISCVInfo
|
||||
RISCVUtils
|
||||
Support
|
||||
|
||||
ADD_TO_COMPONENT
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVASMBACKEND_H
|
||||
#define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVASMBACKEND_H
|
||||
|
||||
#include "MCTargetDesc/RISCVBaseInfo.h"
|
||||
#include "MCTargetDesc/RISCVFixupKinds.h"
|
||||
#include "MCTargetDesc/RISCVMCTargetDesc.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "llvm/MC/MCAsmBackend.h"
|
||||
#include "llvm/MC/MCFixupKindInfo.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
|
|
|
@ -393,11 +393,8 @@ void printVType(unsigned VType, raw_ostream &OS);
|
|||
|
||||
namespace RISCVVPseudosTable {
|
||||
|
||||
// The definition should be consistent with `class RISCVVPseudo` in
|
||||
// RISCVInstrInfoVPseudos.td.
|
||||
static const uint8_t InvalidIndex = 0x80;
|
||||
|
||||
struct PseudoInfo {
|
||||
#include "MCTargetDesc/RISCVBaseInfo.h"
|
||||
uint16_t Pseudo;
|
||||
uint16_t BaseInstr;
|
||||
};
|
|
@ -11,9 +11,9 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "RISCVELFStreamer.h"
|
||||
#include "MCTargetDesc/RISCVAsmBackend.h"
|
||||
#include "RISCVAsmBackend.h"
|
||||
#include "RISCVBaseInfo.h"
|
||||
#include "RISCVMCTargetDesc.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "llvm/BinaryFormat/ELF.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/MC/MCSectionELF.h"
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "RISCVInstPrinter.h"
|
||||
#include "MCTargetDesc/RISCVMCExpr.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "RISCVBaseInfo.h"
|
||||
#include "RISCVMCExpr.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "MCTargetDesc/RISCVBaseInfo.h"
|
||||
#include "MCTargetDesc/RISCVFixupKinds.h"
|
||||
#include "MCTargetDesc/RISCVMCExpr.h"
|
||||
#include "MCTargetDesc/RISCVMCTargetDesc.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/MC/MCCodeEmitter.h"
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "RISCVMCTargetDesc.h"
|
||||
#include "RISCVBaseInfo.h"
|
||||
#include "RISCVELFStreamer.h"
|
||||
#include "RISCVInstPrinter.h"
|
||||
#include "RISCVMCAsmInfo.h"
|
||||
#include "RISCVTargetStreamer.h"
|
||||
#include "TargetInfo/RISCVTargetInfo.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/MC/MCInstrAnalysis.h"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#ifndef LLVM_LIB_TARGET_RISCV_RISCV_H
|
||||
#define LLVM_LIB_TARGET_RISCV_RISCV_H
|
||||
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "MCTargetDesc/RISCVBaseInfo.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
|
||||
namespace llvm {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "RISCVISelDAGToDAG.h"
|
||||
#include "MCTargetDesc/RISCVMCTargetDesc.h"
|
||||
#include "Utils/RISCVMatInt.h"
|
||||
#include "MCTargetDesc/RISCVMatInt.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/IR/IntrinsicsRISCV.h"
|
||||
#include "llvm/Support/Alignment.h"
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "RISCVISelLowering.h"
|
||||
#include "MCTargetDesc/RISCVMatInt.h"
|
||||
#include "RISCV.h"
|
||||
#include "RISCVMachineFunctionInfo.h"
|
||||
#include "RISCVRegisterInfo.h"
|
||||
#include "RISCVSubtarget.h"
|
||||
#include "RISCVTargetMachine.h"
|
||||
#include "Utils/RISCVMatInt.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/CodeGen/CallingConvLower.h"
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "RISCVInstrInfo.h"
|
||||
#include "MCTargetDesc/RISCVMatInt.h"
|
||||
#include "RISCV.h"
|
||||
#include "RISCVSubtarget.h"
|
||||
#include "RISCVTargetMachine.h"
|
||||
#include "Utils/RISCVMatInt.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
#ifndef LLVM_LIB_TARGET_RISCV_RISCVSUBTARGET_H
|
||||
#define LLVM_LIB_TARGET_RISCV_RISCVSUBTARGET_H
|
||||
|
||||
#include "MCTargetDesc/RISCVBaseInfo.h"
|
||||
#include "RISCVFrameLowering.h"
|
||||
#include "RISCVISelLowering.h"
|
||||
#include "RISCVInstrInfo.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/CallLowering.h"
|
||||
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
|
||||
#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "RISCVTargetMachine.h"
|
||||
#include "MCTargetDesc/RISCVBaseInfo.h"
|
||||
#include "RISCV.h"
|
||||
#include "RISCVTargetObjectFile.h"
|
||||
#include "RISCVTargetTransformInfo.h"
|
||||
#include "TargetInfo/RISCVTargetInfo.h"
|
||||
#include "Utils/RISCVBaseInfo.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/CodeGen/GlobalISel/IRTranslator.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "RISCVTargetTransformInfo.h"
|
||||
#include "Utils/RISCVMatInt.h"
|
||||
#include "MCTargetDesc/RISCVMatInt.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/CodeGen/BasicTTIImpl.h"
|
||||
#include "llvm/CodeGen/TargetLowering.h"
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
add_llvm_component_library(LLVMRISCVUtils
|
||||
RISCVBaseInfo.cpp
|
||||
RISCVMatInt.cpp
|
||||
|
||||
LINK_COMPONENTS
|
||||
Support
|
||||
|
||||
ADD_TO_COMPONENT
|
||||
RISCV
|
||||
)
|
Loading…
Reference in New Issue