LLVM 20.0.0git
Namespaces | Macros | Functions | Variables
HexagonMCTargetDesc.cpp File Reference
#include "MCTargetDesc/HexagonMCTargetDesc.h"
#include "HexagonDepArch.h"
#include "HexagonTargetStreamer.h"
#include "MCTargetDesc/HexagonInstPrinter.h"
#include "MCTargetDesc/HexagonMCAsmInfo.h"
#include "MCTargetDesc/HexagonMCELFStreamer.h"
#include "MCTargetDesc/HexagonMCInstrInfo.h"
#include "TargetInfo/HexagonTargetInfo.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCELFObjectWriter.h"
#include "llvm/MC/MCELFStreamer.h"
#include "llvm/MC/MCInstrAnalysis.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/HexagonAttributes.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <mutex>
#include <new>
#include <string>
#include <unordered_map>
#include "HexagonGenInstrInfo.inc"
#include "HexagonGenSubtargetInfo.inc"
#include "HexagonGenRegisterInfo.inc"

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::HexagonFUnits
 

Macros

#define GET_INSTRINFO_MC_DESC
 
#define ENABLE_INSTR_PREDICATE_VERIFIER
 
#define GET_SUBTARGETINFO_MC_DESC
 
#define GET_REGINFO_MC_DESC
 

Functions

static StringRef HexagonGetArchVariant ()
 
bool llvm::HexagonFUnits::isSlot0Only (unsigned units)
 
static MCRegisterInfocreateHexagonMCRegisterInfo (const Triple &TT)
 
static MCAsmInfocreateHexagonMCAsmInfo (const MCRegisterInfo &MRI, const Triple &TT, const MCTargetOptions &Options)
 
static MCInstPrintercreateHexagonMCInstPrinter (const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
 
static MCTargetStreamercreateMCAsmTargetStreamer (MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *IP)
 
static MCStreamercreateMCStreamer (Triple const &T, MCContext &Context, std::unique_ptr< MCAsmBackend > &&MAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter)
 
static MCTargetStreamercreateHexagonObjectTargetStreamer (MCStreamer &S, const MCSubtargetInfo &STI)
 
static MCTargetStreamercreateHexagonNullTargetStreamer (MCStreamer &S)
 
static void LLVM_ATTRIBUTE_UNUSED clearFeature (MCSubtargetInfo *STI, uint64_t F)
 
static bool LLVM_ATTRIBUTE_UNUSED checkFeature (MCSubtargetInfo *STI, uint64_t F)
 
static bool isCPUValid (StringRef CPU)
 
static MCInstrAnalysiscreateHexagonMCInstrAnalysis (const MCInstrInfo *Info)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonTargetMC ()
 

Variables

cl::opt< Hexagon::ArchEnumEnableHVX ("mhvx", cl::desc("Enable Hexagon Vector eXtensions"), cl::values(clEnumValN(Hexagon::ArchEnum::V60, "v60", "Build for HVX v60"), clEnumValN(Hexagon::ArchEnum::V62, "v62", "Build for HVX v62"), clEnumValN(Hexagon::ArchEnum::V65, "v65", "Build for HVX v65"), clEnumValN(Hexagon::ArchEnum::V66, "v66", "Build for HVX v66"), clEnumValN(Hexagon::ArchEnum::V67, "v67", "Build for HVX v67"), clEnumValN(Hexagon::ArchEnum::V68, "v68", "Build for HVX v68"), clEnumValN(Hexagon::ArchEnum::V69, "v69", "Build for HVX v69"), clEnumValN(Hexagon::ArchEnum::V71, "v71", "Build for HVX v71"), clEnumValN(Hexagon::ArchEnum::V73, "v73", "Build for HVX v73"), clEnumValN(Hexagon::ArchEnum::Generic, "", "")), cl::init(Hexagon::ArchEnum::NoArch), cl::ValueOptional)
 
static cl::opt< boolDisableHVX ("mno-hvx", cl::Hidden, cl::desc("Disable Hexagon Vector eXtensions"))
 
static cl::opt< boolEnableHvxIeeeFp ("mhvx-ieee-fp", cl::Hidden, cl::desc("Enable HVX IEEE floating point extensions"))
 
static cl::opt< boolEnableHexagonCabac ("mcabac", cl::desc("tbd"), cl::init(false))
 
static StringRef DefaultArch = "hexagonv60"
 

Macro Definition Documentation

◆ ENABLE_INSTR_PREDICATE_VERIFIER

#define ENABLE_INSTR_PREDICATE_VERIFIER

Definition at line 50 of file HexagonMCTargetDesc.cpp.

◆ GET_INSTRINFO_MC_DESC

#define GET_INSTRINFO_MC_DESC

Definition at line 49 of file HexagonMCTargetDesc.cpp.

◆ GET_REGINFO_MC_DESC

#define GET_REGINFO_MC_DESC

Definition at line 56 of file HexagonMCTargetDesc.cpp.

◆ GET_SUBTARGETINFO_MC_DESC

#define GET_SUBTARGETINFO_MC_DESC

Definition at line 53 of file HexagonMCTargetDesc.cpp.

Function Documentation

◆ checkFeature()

static bool LLVM_ATTRIBUTE_UNUSED checkFeature ( MCSubtargetInfo STI,
uint64_t  F 
)
static

◆ clearFeature()

static void LLVM_ATTRIBUTE_UNUSED clearFeature ( MCSubtargetInfo STI,
uint64_t  F 
)
static

◆ createHexagonMCAsmInfo()

static MCAsmInfo * createHexagonMCAsmInfo ( const MCRegisterInfo MRI,
const Triple TT,
const MCTargetOptions Options 
)
static

◆ createHexagonMCInstPrinter()

static MCInstPrinter * createHexagonMCInstPrinter ( const Triple T,
unsigned  SyntaxVariant,
const MCAsmInfo MAI,
const MCInstrInfo MII,
const MCRegisterInfo MRI 
)
static

Definition at line 365 of file HexagonMCTargetDesc.cpp.

References MRI.

Referenced by LLVMInitializeHexagonTargetMC().

◆ createHexagonMCInstrAnalysis()

static MCInstrAnalysis * createHexagonMCInstrAnalysis ( const MCInstrInfo Info)
static

Definition at line 708 of file HexagonMCTargetDesc.cpp.

References Info.

Referenced by LLVMInitializeHexagonTargetMC().

◆ createHexagonMCRegisterInfo()

static MCRegisterInfo * createHexagonMCRegisterInfo ( const Triple TT)
static

Definition at line 345 of file HexagonMCTargetDesc.cpp.

References X.

Referenced by LLVMInitializeHexagonTargetMC().

◆ createHexagonNullTargetStreamer()

static MCTargetStreamer * createHexagonNullTargetStreamer ( MCStreamer S)
static

Definition at line 396 of file HexagonMCTargetDesc.cpp.

Referenced by LLVMInitializeHexagonTargetMC().

◆ createHexagonObjectTargetStreamer()

static MCTargetStreamer * createHexagonObjectTargetStreamer ( MCStreamer S,
const MCSubtargetInfo STI 
)
static

Definition at line 392 of file HexagonMCTargetDesc.cpp.

Referenced by LLVMInitializeHexagonTargetMC().

◆ createMCAsmTargetStreamer()

static MCTargetStreamer * createMCAsmTargetStreamer ( MCStreamer S,
formatted_raw_ostream OS,
MCInstPrinter IP 
)
static

Definition at line 377 of file HexagonMCTargetDesc.cpp.

References OS.

Referenced by LLVMInitializeHexagonTargetMC().

◆ createMCStreamer()

static MCStreamer * createMCStreamer ( Triple const T,
MCContext Context,
std::unique_ptr< MCAsmBackend > &&  MAB,
std::unique_ptr< MCObjectWriter > &&  OW,
std::unique_ptr< MCCodeEmitter > &&  Emitter 
)
static

Definition at line 383 of file HexagonMCTargetDesc.cpp.

References llvm::createHexagonELFStreamer(), and Emitter.

Referenced by LLVMInitializeHexagonTargetMC().

◆ HexagonGetArchVariant()

static StringRef HexagonGetArchVariant ( )
static

Definition at line 124 of file HexagonMCTargetDesc.cpp.

Referenced by llvm::Hexagon_MC::selectHexagonCPU().

◆ isCPUValid()

static bool isCPUValid ( StringRef  CPU)
static

◆ LLVMInitializeHexagonTargetMC()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeHexagonTargetMC ( )

Variable Documentation

◆ DefaultArch

StringRef DefaultArch = "hexagonv60"
static

Definition at line 122 of file HexagonMCTargetDesc.cpp.

Referenced by llvm::Hexagon_MC::selectHexagonCPU().

◆ DisableHVX

cl::opt< bool > DisableHVX("mno-hvx", cl::Hidden, cl::desc("Disable Hexagon Vector eXtensions")) ( "mno-hvx"  ,
cl::Hidden  ,
cl::desc("Disable Hexagon Vector eXtensions")   
)
static

◆ EnableHexagonCabac

cl::opt< bool > EnableHexagonCabac("mcabac", cl::desc("tbd"), cl::init(false)) ( "mcabac"  ,
cl::desc("tbd")  ,
cl::init(false)   
)
static

◆ EnableHVX

cl::opt< Hexagon::ArchEnum > EnableHVX("mhvx", cl::desc("Enable Hexagon Vector eXtensions"), cl::values(clEnumValN(Hexagon::ArchEnum::V60, "v60", "Build for HVX v60"), clEnumValN(Hexagon::ArchEnum::V62, "v62", "Build for HVX v62"), clEnumValN(Hexagon::ArchEnum::V65, "v65", "Build for HVX v65"), clEnumValN(Hexagon::ArchEnum::V66, "v66", "Build for HVX v66"), clEnumValN(Hexagon::ArchEnum::V67, "v67", "Build for HVX v67"), clEnumValN(Hexagon::ArchEnum::V68, "v68", "Build for HVX v68"), clEnumValN(Hexagon::ArchEnum::V69, "v69", "Build for HVX v69"), clEnumValN(Hexagon::ArchEnum::V71, "v71", "Build for HVX v71"), clEnumValN(Hexagon::ArchEnum::V73, "v73", "Build for HVX v73"), clEnumValN(Hexagon::ArchEnum::Generic, "", "")), cl::init(Hexagon::ArchEnum::NoArch), cl::ValueOptional) ( "mhvx"  ,
cl::desc("Enable Hexagon Vector eXtensions")  ,
cl::values(clEnumValN(Hexagon::ArchEnum::V60, "v60", "Build for HVX v60"), clEnumValN(Hexagon::ArchEnum::V62, "v62", "Build for HVX v62"), clEnumValN(Hexagon::ArchEnum::V65, "v65", "Build for HVX v65"), clEnumValN(Hexagon::ArchEnum::V66, "v66", "Build for HVX v66"), clEnumValN(Hexagon::ArchEnum::V67, "v67", "Build for HVX v67"), clEnumValN(Hexagon::ArchEnum::V68, "v68", "Build for HVX v68"), clEnumValN(Hexagon::ArchEnum::V69, "v69", "Build for HVX v69"), clEnumValN(Hexagon::ArchEnum::V71, "v71", "Build for HVX v71"), clEnumValN(Hexagon::ArchEnum::V73, "v73", "Build for HVX v73"), clEnumValN(Hexagon::ArchEnum::Generic, "", ""))  ,
cl::init(Hexagon::ArchEnum::NoArch)  ,
cl::ValueOptional   
)

◆ EnableHvxIeeeFp

cl::opt< bool > EnableHvxIeeeFp("mhvx-ieee-fp", cl::Hidden, cl::desc("Enable HVX IEEE floating point extensions")) ( "mhvx-ieee-fp"  ,
cl::Hidden  ,
cl::desc("Enable HVX IEEE floating point extensions")   
)
static