#include "BPFSubtarget.h"
#include "BPF.h"
#include "BPFTargetMachine.h"
#include "GISel/BPFCallLowering.h"
#include "GISel/BPFLegalizerInfo.h"
#include "GISel/BPFRegisterBankInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/TargetParser/Host.h"
usingnamespacellvm;
#define DEBUG_TYPE …
#define GET_SUBTARGETINFO_TARGET_DESC
#define GET_SUBTARGETINFO_CTOR
#include "BPFGenSubtargetInfo.inc"
static cl::opt<bool> Disable_ldsx("disable-ldsx", cl::Hidden, cl::init(false),
cl::desc("Disable ldsx insns"));
static cl::opt<bool> Disable_movsx("disable-movsx", cl::Hidden, cl::init(false),
cl::desc("Disable movsx insns"));
static cl::opt<bool> Disable_bswap("disable-bswap", cl::Hidden, cl::init(false),
cl::desc("Disable bswap insns"));
static cl::opt<bool> Disable_sdiv_smod("disable-sdiv-smod", cl::Hidden,
cl::init(false), cl::desc("Disable sdiv/smod insns"));
static cl::opt<bool> Disable_gotol("disable-gotol", cl::Hidden, cl::init(false),
cl::desc("Disable gotol insn"));
static cl::opt<bool>
Disable_StoreImm("disable-storeimm", cl::Hidden, cl::init(false),
cl::desc("Disable BPF_ST (immediate store) insn"));
void BPFSubtarget::anchor() { … }
BPFSubtarget &BPFSubtarget::initializeSubtargetDependencies(StringRef CPU,
StringRef FS) { … }
void BPFSubtarget::initializeEnvironment() { … }
void BPFSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { … }
BPFSubtarget::BPFSubtarget(const Triple &TT, const std::string &CPU,
const std::string &FS, const TargetMachine &TM)
: … { … }
const CallLowering *BPFSubtarget::getCallLowering() const { … }
InstructionSelector *BPFSubtarget::getInstructionSelector() const { … }
const LegalizerInfo *BPFSubtarget::getLegalizerInfo() const { … }
const RegisterBankInfo *BPFSubtarget::getRegBankInfo() const { … }