#include "XCoreTargetMachine.h"
#include "MCTargetDesc/XCoreMCTargetDesc.h"
#include "TargetInfo/XCoreTargetInfo.h"
#include "XCore.h"
#include "XCoreMachineFunctionInfo.h"
#include "XCoreTargetObjectFile.h"
#include "XCoreTargetTransformInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/CodeGen.h"
#include <optional>
usingnamespacellvm;
static Reloc::Model getEffectiveRelocModel(std::optional<Reloc::Model> RM) { … }
static CodeModel::Model
getEffectiveXCoreCodeModel(std::optional<CodeModel::Model> CM) { … }
XCoreTargetMachine::XCoreTargetMachine(const Target &T, const Triple &TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
std::optional<Reloc::Model> RM,
std::optional<CodeModel::Model> CM,
CodeGenOptLevel OL, bool JIT)
: … { … }
XCoreTargetMachine::~XCoreTargetMachine() = default;
namespace {
class XCorePassConfig : public TargetPassConfig { … };
}
TargetPassConfig *XCoreTargetMachine::createPassConfig(PassManagerBase &PM) { … }
void XCorePassConfig::addIRPasses() { … }
bool XCorePassConfig::addPreISel() { … }
bool XCorePassConfig::addInstSelector() { … }
void XCorePassConfig::addPreEmitPass() { … }
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXCoreTarget() { … }
TargetTransformInfo
XCoreTargetMachine::getTargetTransformInfo(const Function &F) const { … }
MachineFunctionInfo *XCoreTargetMachine::createMachineFunctionInfo(
BumpPtrAllocator &Allocator, const Function &F,
const TargetSubtargetInfo *STI) const { … }