28 cl::desc(
"Disable machine peepholes for BPF"));
43 return "E-m:e-p:64:64-i64:64-n32:64-S128";
45 return "e-m:e-p:64:64-i64:64-n32:64-S128";
70 Subtarget(TT, CPU, FS, *this) {
84 return getTM<BPFTargetMachine>();
87 bool addInstSelector()
override;
88 void addMachineSSAOptimization()
override;
89 void addPreEmitPass()
override;
94 return new BPFPassConfig(*
this, PM);
99 bool BPFPassConfig::addInstSelector() {
105 void BPFPassConfig::addMachineSSAOptimization() {
110 const BPFSubtarget *Subtarget = getBPFTargetMachine().getSubtargetImpl();
115 void BPFPassConfig::addPreEmitPass() {
116 const BPFSubtarget *Subtarget = getBPFTargetMachine().getSubtargetImpl();
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
void initializeBPFMIPeepholePass(PassRegistry &)
Compute iterated dominance frontiers using a linear time algorithm.
FunctionPass * createBPFMIPreEmitPeepholePass()
std::enable_if<!std::is_array< T >::value, std::unique_ptr< T > >::type make_unique(Args &&... args)
Constructs a new T() with the given args and returns a unique_ptr<T> which owns the object...
virtual void addMachineSSAOptimization()
addMachineSSAOptimization - Add standard passes that optimize machine instructions in SSA form...
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
void setDwarfUsesRelocationsAcrossSections(bool enable)
Target-Independent Code Generator Pass Configuration Options.
const MCAsmInfo * AsmInfo
Contains target specific asm information.
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
RegisterTargetMachine - Helper template for registering a target machine implementation, for use in the target machine initialization function.
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
static cl::opt< bool > DisableMIPeephole("disable-bpf-peephole", cl::Hidden, cl::desc("Disable machine peepholes for BPF"))
static CodeModel::Model getEffectiveCodeModel(Optional< CodeModel::Model > CM)
This class is intended to be used as a base class for asm properties and features specific to the tar...
bool getUseDwarfRIS() const
CodeGenOpt::Level getOptLevel() const
Returns the optimization level: None, Less, Default, or Aggressive.
static Reloc::Model getEffectiveRelocModel(Optional< Reloc::Model > RM)
This class describes a target machine that is implemented with the LLVM target-independent code gener...
FunctionPass * createBPFMIPeepholePass()
Triple - Helper class for working with autoconf configuration names.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
BPFTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT)
Target - Wrapper for Target specific information.
void LLVMInitializeBPFTarget()
static std::string computeDataLayout(const Triple &TT)
Target & getTheBPFleTarget()
StringRef - Represent a constant reference to a string, i.e.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Target & getTheBPFbeTarget()
FunctionPass * createBPFISelDag(BPFTargetMachine &TM)
Target & getTheBPFTarget()